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/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
10 #include "ash/magnifier/magnification_controller.h" | 10 #include "ash/magnifier/magnification_controller.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "ui/base/x/x11_util.h" | 34 #include "ui/base/x/x11_util.h" |
35 #endif | 35 #endif |
36 | 36 |
37 | 37 |
38 namespace chrome { | 38 namespace chrome { |
39 | 39 |
40 bool ShouldOpenAshOnStartup() { | 40 bool ShouldOpenAshOnStartup() { |
41 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
42 return true; | 42 return true; |
43 #endif | 43 #endif |
44 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh); | 44 // TODO(scottmg): http://crbug.com/133312, will need this for Win8 too. |
| 45 return false; |
45 } | 46 } |
46 | 47 |
47 void OpenAsh() { | 48 void OpenAsh() { |
48 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( | 49 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( |
49 switches::kAuraHostWindowUseFullscreen); | 50 switches::kAuraHostWindowUseFullscreen); |
50 | 51 |
51 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
52 if (base::chromeos::IsRunningOnChromeOS()) { | 53 if (base::chromeos::IsRunningOnChromeOS()) { |
53 use_fullscreen = true; | 54 use_fullscreen = true; |
54 // Hides the cursor outside of the Aura root window. The cursor will be | 55 // Hides the cursor outside of the Aura root window. The cursor will be |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #endif | 100 #endif |
100 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 101 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); |
101 } | 102 } |
102 | 103 |
103 void CloseAsh() { | 104 void CloseAsh() { |
104 if (ash::Shell::GetInstance()) | 105 if (ash::Shell::GetInstance()) |
105 ash::Shell::DeleteInstance(); | 106 ash::Shell::DeleteInstance(); |
106 } | 107 } |
107 | 108 |
108 } // namespace chrome | 109 } // namespace chrome |
OLD | NEW |