| 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 "chrome/browser/chrome_browser_main.h" | 9 #include "chrome/browser/chrome_browser_main.h" |
| 10 #include "chrome/browser/ui/aura/active_desktop_monitor.h" | 10 #include "chrome/browser/ui/aura/active_desktop_monitor.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #endif // defined(USE_ASH) | 37 #endif // defined(USE_ASH) |
| 38 | 38 |
| 39 #if !defined(OS_CHROMEOS) | 39 #if !defined(OS_CHROMEOS) |
| 40 #include "ui/views/widget/desktop_aura/desktop_screen.h" | 40 #include "ui/views/widget/desktop_aura/desktop_screen.h" |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 45 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 46 ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) { | 46 ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) { |
| 47 if (!window) |
| 48 return NULL; |
| 49 |
| 47 Profile* profile = NULL; | 50 Profile* profile = NULL; |
| 48 if (window->type() == ui::wm::WINDOW_TYPE_NORMAL || | 51 if (window->type() == ui::wm::WINDOW_TYPE_NORMAL || |
| 49 window->type() == ui::wm::WINDOW_TYPE_POPUP) { | 52 window->type() == ui::wm::WINDOW_TYPE_POPUP) { |
| 50 profile = reinterpret_cast<Profile*>( | 53 profile = reinterpret_cast<Profile*>( |
| 51 window->GetNativeWindowProperty(Profile::kProfileKey)); | 54 window->GetNativeWindowProperty(Profile::kProfileKey)); |
| 52 } | 55 } |
| 53 | 56 |
| 54 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) | 57 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) |
| 55 return ui::NativeThemeAura::instance(); | 58 return ui::NativeThemeAura::instance(); |
| 56 | 59 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 chrome::MESSAGE_BOX_TYPE_WARNING); | 152 chrome::MESSAGE_BOX_TYPE_WARNING); |
| 150 | 153 |
| 151 // Avoids gpu_process_transport_factory.cc(153)] Check failed: | 154 // Avoids gpu_process_transport_factory.cc(153)] Check failed: |
| 152 // per_compositor_data_.empty() when quit is chosen. | 155 // per_compositor_data_.empty() when quit is chosen. |
| 153 base::RunLoop().RunUntilIdle(); | 156 base::RunLoop().RunUntilIdle(); |
| 154 | 157 |
| 155 exit(EXIT_FAILURE); | 158 exit(EXIT_FAILURE); |
| 156 } | 159 } |
| 157 } | 160 } |
| 158 #endif | 161 #endif |
| OLD | NEW |