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

Side by Side Diff: chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc

Issue 2401363005: Remove sundry IsModeMaterial checks. (Closed)
Patch Set: resolve merge conflict Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/tabs/tab_utils.cc ('k') | chrome/browser/ui/views/tabs/tab_strip_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h" 5 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/chrome_browser_main.h" 9 #include "chrome/browser/chrome_browser_main.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 views::LinuxUI::SetInstance(gtk2_ui); 84 views::LinuxUI::SetInstance(gtk2_ui);
85 } 85 }
86 86
87 void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { 87 void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
88 ChromeBrowserMainExtraPartsViews::ToolkitInitialized(); 88 ChromeBrowserMainExtraPartsViews::ToolkitInitialized();
89 views::LinuxUI::instance()->Initialize(); 89 views::LinuxUI::instance()->Initialize();
90 } 90 }
91 91
92 void ChromeBrowserMainExtraPartsViewsLinux::PreCreateThreads() { 92 void ChromeBrowserMainExtraPartsViewsLinux::PreCreateThreads() {
93 ChromeBrowserMainExtraPartsViews::PreCreateThreads(); 93 ChromeBrowserMainExtraPartsViews::PreCreateThreads();
94 // TODO(varkha): The next call should not be necessary once Material Design is
95 // on unconditionally.
96 views::LinuxUI::instance()->MaterialDesignControllerReady();
97 views::LinuxUI::instance()->UpdateDeviceScaleFactor( 94 views::LinuxUI::instance()->UpdateDeviceScaleFactor(
98 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); 95 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
99 96
100 views::X11DesktopHandler::get()->AddObserver(this); 97 views::X11DesktopHandler::get()->AddObserver(this);
101 } 98 }
102 99
103 void ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() { 100 void ChromeBrowserMainExtraPartsViewsLinux::PreProfileInit() {
104 ChromeBrowserMainExtraPartsViews::PreProfileInit(); 101 ChromeBrowserMainExtraPartsViews::PreProfileInit();
105 // On the Linux desktop, we want to prevent the user from logging in as root, 102 // On the Linux desktop, we want to prevent the user from logging in as root,
106 // so that we don't destroy the profile. Now that we have some minimal ui 103 // so that we don't destroy the profile. Now that we have some minimal ui
(...skipping 17 matching lines...) Expand all
124 // per_compositor_data_.empty() when quit is chosen. 121 // per_compositor_data_.empty() when quit is chosen.
125 base::RunLoop().RunUntilIdle(); 122 base::RunLoop().RunUntilIdle();
126 123
127 exit(EXIT_FAILURE); 124 exit(EXIT_FAILURE);
128 } 125 }
129 126
130 void ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged( 127 void ChromeBrowserMainExtraPartsViewsLinux::OnWorkspaceChanged(
131 const std::string& new_workspace) { 128 const std::string& new_workspace) {
132 BrowserList::MoveBrowsersInWorkspaceToFront(new_workspace); 129 BrowserList::MoveBrowsersInWorkspaceToFront(new_workspace);
133 } 130 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_utils.cc ('k') | chrome/browser/ui/views/tabs/tab_strip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698