Register default layout provider
This commit is contained in:
parent
34fff57646
commit
ad33e569d6
2 changed files with 7 additions and 0 deletions
|
@ -247,6 +247,10 @@ int BrowserMainParts::PreCreateThreads() {
|
|||
views::LinuxUI::instance()->UpdateDeviceScaleFactor();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!views::LayoutProvider::Get())
|
||||
layout_provider_.reset(new views::LayoutProvider());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "content/public/browser/browser_main_parts.h"
|
||||
#include "ui/views/layout/layout_provider.h"
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
namespace brightray {
|
||||
|
@ -54,6 +55,8 @@ class BrowserMainParts : public content::BrowserMainParts {
|
|||
std::unique_ptr<wm::WMState> wm_state_;
|
||||
#endif
|
||||
|
||||
std::unique_ptr<views::LayoutProvider> layout_provider_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue