| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/aura/chrome_browser_main_extra_parts_aura.h" | 5 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/chrome_browser_main.h" | 10 #include "chrome/browser/chrome_browser_main.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 window->GetNativeWindowProperty(Profile::kProfileKey)); | 61 window->GetNativeWindowProperty(Profile::kProfileKey)); |
| 62 } | 62 } |
| 63 | 63 |
| 64 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) { | 64 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) { |
| 65 // Only toplevel browser windows and CONTROL type windows (such as the find | 65 // Only toplevel browser windows and CONTROL type windows (such as the find |
| 66 // in page bar) should use special theming for off the record mode. | 66 // in page bar) should use special theming for off the record mode. |
| 67 // WINDOW_TYPE_NORMAL is not enough to distinguish browser windows because | 67 // WINDOW_TYPE_NORMAL is not enough to distinguish browser windows because |
| 68 // it also encompasses dialogs. | 68 // it also encompasses dialogs. |
| 69 bool eligible_for_otr = window->type() == ui::wm::WINDOW_TYPE_CONTROL || | 69 bool eligible_for_otr = window->type() == ui::wm::WINDOW_TYPE_CONTROL || |
| 70 BrowserView::GetBrowserViewForNativeWindow(window); | 70 BrowserView::GetBrowserViewForNativeWindow(window); |
| 71 if (eligible_for_otr && profile->IsOffTheRecord()) | 71 if (eligible_for_otr && |
| 72 profile->GetProfileType() == Profile::INCOGNITO_PROFILE) { |
| 72 return ui::NativeThemeDarkAura::instance(); | 73 return ui::NativeThemeDarkAura::instance(); |
| 74 } |
| 73 | 75 |
| 74 return ui::NativeThemeAura::instance(); | 76 return ui::NativeThemeAura::instance(); |
| 75 } | 77 } |
| 76 | 78 |
| 77 return nullptr; | 79 return nullptr; |
| 78 } | 80 } |
| 79 #endif | 81 #endif |
| 80 | 82 |
| 81 #if !defined(OS_CHROMEOS) && defined(USE_ASH) | 83 #if !defined(OS_CHROMEOS) && defined(USE_ASH) |
| 82 // Returns the desktop this process was initially launched in. | 84 // Returns the desktop this process was initially launched in. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 chrome::MESSAGE_BOX_TYPE_WARNING); | 193 chrome::MESSAGE_BOX_TYPE_WARNING); |
| 192 | 194 |
| 193 // Avoids gpu_process_transport_factory.cc(153)] Check failed: | 195 // Avoids gpu_process_transport_factory.cc(153)] Check failed: |
| 194 // per_compositor_data_.empty() when quit is chosen. | 196 // per_compositor_data_.empty() when quit is chosen. |
| 195 base::RunLoop().RunUntilIdle(); | 197 base::RunLoop().RunUntilIdle(); |
| 196 | 198 |
| 197 exit(EXIT_FAILURE); | 199 exit(EXIT_FAILURE); |
| 198 } | 200 } |
| 199 } | 201 } |
| 200 #endif | 202 #endif |
| OLD | NEW |