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 "chrome/browser/chrome_browser_main.h" | 7 #include "chrome/browser/chrome_browser_main.h" |
8 #include "chrome/browser/ui/aura/active_desktop_monitor.h" | 8 #include "chrome/browser/ui/aura/active_desktop_monitor.h" |
9 #include "chrome/browser/ui/host_desktop.h" | 9 #include "chrome/browser/ui/host_desktop.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 #if defined(USE_ASH) | 21 #if defined(USE_ASH) |
22 #include "chrome/browser/ui/ash/ash_init.h" | 22 #include "chrome/browser/ui/ash/ash_init.h" |
23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
24 #include "base/command_line.h" | 24 #include "base/command_line.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #endif // defined(OS_WIN) | 26 #endif // defined(OS_WIN) |
27 #endif // defined(USE_ASH) | 27 #endif // defined(USE_ASH) |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 #if !defined(OS_CHROMEOS) && defined(USE_ASH) | |
31 // Returns the desktop this process was initially launched in. | 32 // Returns the desktop this process was initially launched in. |
32 chrome::HostDesktopType GetInitialDesktop() { | 33 chrome::HostDesktopType GetInitialDesktop() { |
33 #if defined(OS_WIN) && defined(USE_ASH) | 34 #if defined(OS_WIN) && defined(USE_ASH) |
34 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 35 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
35 if (command_line->HasSwitch(switches::kViewerConnect) || | 36 if (command_line->HasSwitch(switches::kViewerConnect) || |
36 command_line->HasSwitch(switches::kViewerLaunchViaAppId)) { | 37 command_line->HasSwitch(switches::kViewerLaunchViaAppId)) { |
37 return chrome::HOST_DESKTOP_TYPE_ASH; | 38 return chrome::HOST_DESKTOP_TYPE_ASH; |
38 } | 39 } |
39 #endif | 40 #endif |
40 return chrome::HOST_DESKTOP_TYPE_NATIVE; | 41 return chrome::HOST_DESKTOP_TYPE_NATIVE; |
41 } | 42 } |
43 #endif | |
Nico
2013/11/10 05:07:09
// !defined(OS_CHROMEOS) && defined(USE_ASH)
hans
2013/11/11 19:29:51
Done.
| |
42 | 44 |
43 } // namespace | 45 } // namespace |
44 | 46 |
45 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { | 47 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() { |
46 } | 48 } |
47 | 49 |
48 ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() { | 50 ChromeBrowserMainExtraPartsAura::~ChromeBrowserMainExtraPartsAura() { |
49 } | 51 } |
50 | 52 |
51 void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() { | 53 void ChromeBrowserMainExtraPartsAura::PreEarlyInitialization() { |
(...skipping 27 matching lines...) Expand all Loading... | |
79 } | 81 } |
80 #endif | 82 #endif |
81 } | 83 } |
82 | 84 |
83 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | 85 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
84 active_desktop_monitor_.reset(); | 86 active_desktop_monitor_.reset(); |
85 | 87 |
86 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown | 88 // aura::Env instance is deleted in BrowserProcessImpl::StartTearDown |
87 // after the metrics service is deleted. | 89 // after the metrics service is deleted. |
88 } | 90 } |
OLD | NEW |