| 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 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" | 30 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" |
| 31 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" | 31 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" |
| 32 #include "chrome/browser/ui/ash/keyboard_brightness_controller_chromeos.h" | 32 #include "chrome/browser/ui/ash/keyboard_brightness_controller_chromeos.h" |
| 33 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 33 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
| 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() { | |
| 41 #if defined(OS_CHROMEOS) | |
| 42 return true; | |
| 43 #endif | |
| 44 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh); | |
| 45 } | |
| 46 | |
| 47 void OpenAsh() { | 40 void OpenAsh() { |
| 48 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( | 41 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( |
| 49 switches::kAuraHostWindowUseFullscreen); | 42 switches::kAuraHostWindowUseFullscreen); |
| 50 | 43 |
| 51 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
| 52 if (base::chromeos::IsRunningOnChromeOS()) { | 45 if (base::chromeos::IsRunningOnChromeOS()) { |
| 53 use_fullscreen = true; | 46 use_fullscreen = true; |
| 54 // Hides the cursor outside of the Aura root window. The cursor will be | 47 // Hides the cursor outside of the Aura root window. The cursor will be |
| 55 // drawn within the Aura root window, and it'll remain hidden after the | 48 // drawn within the Aura root window, and it'll remain hidden after the |
| 56 // Aura window is closed. | 49 // Aura window is closed. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 #endif | 92 #endif |
| 100 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 93 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); |
| 101 } | 94 } |
| 102 | 95 |
| 103 void CloseAsh() { | 96 void CloseAsh() { |
| 104 if (ash::Shell::GetInstance()) | 97 if (ash::Shell::GetInstance()) |
| 105 ash::Shell::DeleteInstance(); | 98 ash::Shell::DeleteInstance(); |
| 106 } | 99 } |
| 107 | 100 |
| 108 } // namespace chrome | 101 } // namespace chrome |
| OLD | NEW |