Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1933)

Unified Diff: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc

Issue 2818123002: Move LayoutProvider initialization to later in the startup process. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
index 556bd754b5435d347b193fd0119b59fb4bcf173c..2a85dcc89c3b1f13038a2fda8ee55b38f1268276 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
@@ -73,9 +73,6 @@ void ChromeBrowserMainExtraPartsViews::ToolkitInitialized() {
if (!views::ViewsDelegate::GetInstance())
views_delegate_ = base::MakeUnique<ChromeViewsDelegate>();
- if (!views::LayoutProvider::Get())
- layout_provider_ = ChromeLayoutProvider::CreateLayoutProvider();
-
SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient());
#if defined(USE_AURA)
@@ -90,6 +87,9 @@ void ChromeBrowserMainExtraPartsViews::PreCreateThreads() {
if (!display::Screen::GetScreen())
display::Screen::SetScreenInstance(views::CreateDesktopScreen());
#endif
+
+ if (!views::LayoutProvider::Get())
Peter Kasting 2017/04/14 18:14:32 Is it safe to move the ViewsDelegate creation here
kylix_rd 2017/04/14 18:35:26 I cannot directly answer that question, but my rea
Peter Kasting 2017/04/14 18:44:49 That sounds like an argument that we should, in fa
+ layout_provider_ = ChromeLayoutProvider::CreateLayoutProvider();
}
void ChromeBrowserMainExtraPartsViews::PreProfileInit() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698