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/ash/ash_init.h" | 5 #include "chrome/browser/ui/ash/ash_init.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/accelerometer/accelerometer_controller.h" | 8 #include "ash/accelerometer/accelerometer_controller.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/high_contrast/high_contrast_controller.h" | 10 #include "ash/high_contrast/high_contrast_controller.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
30 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" | 30 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" |
31 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 31 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
32 #include "chromeos/chromeos_switches.h" | 32 #include "chromeos/chromeos_switches.h" |
33 #include "chromeos/login/login_state.h" | 33 #include "chromeos/login/login_state.h" |
34 #include "ui/base/x/x11_util.h" | 34 #include "ui/base/x/x11_util.h" |
35 #endif | 35 #endif |
36 | 36 |
37 namespace chrome { | 37 namespace chrome { |
38 | 38 |
39 bool ShouldOpenAshOnStartup() { | |
40 #if defined(OS_CHROMEOS) | |
41 return true; | |
42 #endif | |
43 // TODO(scottmg): http://crbug.com/133312, will need this for Win8 too. | |
44 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh); | |
45 } | |
46 | |
47 void OpenAsh(gfx::AcceleratedWidget remote_window) { | 39 void OpenAsh(gfx::AcceleratedWidget remote_window) { |
48 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
49 #if defined(USE_X11) | 41 #if defined(USE_X11) |
50 if (base::SysInfo::IsRunningOnChromeOS()) { | 42 if (base::SysInfo::IsRunningOnChromeOS()) { |
51 // Hides the cursor outside of the Aura root window. The cursor will be | 43 // Hides the cursor outside of the Aura root window. The cursor will be |
52 // drawn within the Aura root window, and it'll remain hidden after the | 44 // drawn within the Aura root window, and it'll remain hidden after the |
53 // Aura window is closed. | 45 // Aura window is closed. |
54 ui::HideHostCursor(); | 46 ui::HideHostCursor(); |
55 } | 47 } |
56 #endif | 48 #endif |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #endif | 91 #endif |
100 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 92 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
101 } | 93 } |
102 | 94 |
103 void CloseAsh() { | 95 void CloseAsh() { |
104 if (ash::Shell::HasInstance()) | 96 if (ash::Shell::HasInstance()) |
105 ash::Shell::DeleteInstance(); | 97 ash::Shell::DeleteInstance(); |
106 } | 98 } |
107 | 99 |
108 } // namespace chrome | 100 } // namespace chrome |
OLD | NEW |