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

Unified Diff: chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc

Issue 1427803004: GTK: Apply browser theme to TYPE_CONTROL windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative ps Created 5 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 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/aura/chrome_browser_main_extra_parts_aura.cc
diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
index 9e9476b0e075084089994f3ac68e3b83ec6a7bf3..4c6949c15ab418ab0b4b4b161533ee76907a265d 100644
--- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc
@@ -46,11 +46,12 @@ namespace {
#if defined(USE_X11) && !defined(OS_CHROMEOS)
ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
if (!window)
- return NULL;
+ return nullptr;
- Profile* profile = NULL;
+ Profile* profile = nullptr;
if (window->type() == ui::wm::WINDOW_TYPE_NORMAL ||
- window->type() == ui::wm::WINDOW_TYPE_POPUP) {
+ window->type() == ui::wm::WINDOW_TYPE_POPUP ||
+ window->type() == ui::wm::WINDOW_TYPE_CONTROL) {
profile = reinterpret_cast<Profile*>(
window->GetNativeWindowProperty(Profile::kProfileKey));
}
@@ -58,7 +59,7 @@ ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme))
return ui::NativeThemeAura::instance();
- return NULL;
+ return nullptr;
}
#endif
@@ -123,9 +124,11 @@ void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() {
void ChromeBrowserMainExtraPartsAura::PreCreateThreads() {
#if !defined(OS_CHROMEOS)
#if defined(USE_ASH)
- if (!chrome::ShouldOpenAshOnStartup())
+ bool should_open_ash = chrome::ShouldOpenAshOnStartup();
+#else
+ bool should_open_ash = false;
Evan Stade 2015/10/29 22:59:43 p.s. this change was just made to silence a presub
Elliot Glaysher 2015/10/29 23:04:51 Can't wait until ash is gone from chrome.
#endif
- {
+ if (!should_open_ash) {
gfx::Screen* screen = views::CreateDesktopScreen();
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen);
#if defined(USE_X11)
« 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