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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 window->GetNativeWindowProperty(Profile::kProfileKey)); | 55 window->GetNativeWindowProperty(Profile::kProfileKey)); |
56 } | 56 } |
57 | 57 |
58 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) | 58 if (profile && !profile->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) |
59 return ui::NativeThemeAura::instance(); | 59 return ui::NativeThemeAura::instance(); |
60 | 60 |
61 return NULL; | 61 return NULL; |
62 } | 62 } |
63 #endif | 63 #endif |
64 | 64 |
65 #if !defined(OS_CHROMEOS) && defined(USE_ASH) | 65 #if !defined(OS_CHROMEOS) |
66 // Returns the desktop this process was initially launched in. | 66 // Returns the desktop this process was initially launched in. |
67 chrome::HostDesktopType GetInitialDesktop() { | 67 chrome::HostDesktopType GetInitialDesktop() { |
68 #if defined(OS_WIN) && defined(USE_ASH) | 68 #if defined(USE_ASH) |
| 69 #if defined(OS_WIN) |
69 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 70 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
70 if (command_line->HasSwitch(switches::kViewerConnect) || | 71 if (command_line->HasSwitch(switches::kViewerConnect) || |
71 command_line->HasSwitch(switches::kViewerLaunchViaAppId)) { | 72 command_line->HasSwitch(switches::kViewerLaunchViaAppId)) { |
72 return chrome::HOST_DESKTOP_TYPE_ASH; | 73 return chrome::HOST_DESKTOP_TYPE_ASH; |
73 } | 74 } |
74 #elif defined(OS_LINUX) | 75 #elif defined(OS_LINUX) |
75 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 76 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
76 if (command_line->HasSwitch(switches::kOpenAsh)) | 77 if (command_line->HasSwitch(switches::kOpenAsh)) |
77 return chrome::HOST_DESKTOP_TYPE_ASH; | 78 return chrome::HOST_DESKTOP_TYPE_ASH; |
78 #endif | 79 #endif |
| 80 #endif |
79 | 81 |
80 return chrome::HOST_DESKTOP_TYPE_NATIVE; | 82 return chrome::HOST_DESKTOP_TYPE_NATIVE; |
81 } | 83 } |
82 #endif // !defined(OS_CHROMEOS) && defined(USE_ASH) | 84 #endif // !defined(OS_CHROMEOS) && defined(USE_ASH) |
83 | 85 |
84 } // namespace | 86 } // namespace |
85 | 87 |
86 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { | 88 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { |
87 } | 89 } |
88 | 90 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 chrome::MESSAGE_BOX_TYPE_WARNING); | 167 chrome::MESSAGE_BOX_TYPE_WARNING); |
166 | 168 |
167 // Avoids gpu_process_transport_factory.cc(153)] Check failed: | 169 // Avoids gpu_process_transport_factory.cc(153)] Check failed: |
168 // per_compositor_data_.empty() when quit is chosen. | 170 // per_compositor_data_.empty() when quit is chosen. |
169 base::RunLoop().RunUntilIdle(); | 171 base::RunLoop().RunUntilIdle(); |
170 | 172 |
171 exit(EXIT_FAILURE); | 173 exit(EXIT_FAILURE); |
172 } | 174 } |
173 } | 175 } |
174 #endif | 176 #endif |
OLD | NEW |