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" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/wm/key_rewriter_event_filter.h" | 12 #include "ash/wm/key_rewriter_event_filter.h" |
13 #include "ash/wm/property_util.h" | 13 #include "ash/wm/property_util.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
16 #include "chrome/browser/lifetime/application_lifetime.h" | 16 #include "chrome/browser/lifetime/application_lifetime.h" |
17 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" | 17 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" |
18 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" | 18 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" |
19 #include "chrome/browser/ui/views/ash/key_rewriter.h" | 19 #include "chrome/browser/ui/views/ash/key_rewriter.h" |
20 #include "chrome/browser/ui/views/ash/screenshot_taker.h" | 20 #include "chrome/browser/ui/views/ash/screenshot_taker.h" |
21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
22 #include "ui/aura/aura_switches.h" | 22 #include "ui/aura/aura_switches.h" |
23 #include "ui/aura/env.h" | 23 #include "ui/aura/env.h" |
24 #include "ui/aura/monitor_manager.h" | 24 #include "ui/aura/display_manager.h" |
25 #include "ui/aura/root_window.h" | 25 #include "ui/aura/root_window.h" |
26 #include "ui/compositor/compositor_setup.h" | 26 #include "ui/compositor/compositor_setup.h" |
27 | 27 |
28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
29 #include "base/chromeos/chromeos_version.h" | 29 #include "base/chromeos/chromeos_version.h" |
30 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 30 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
31 #include "chrome/browser/chromeos/login/user_manager.h" | 31 #include "chrome/browser/chromeos/login/user_manager.h" |
32 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h" | 32 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h" |
33 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h" | 33 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h" |
34 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h" | 34 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h" |
(...skipping 12 matching lines...) Expand all Loading... |
47 void OpenAsh() { | 47 void OpenAsh() { |
48 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( | 48 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( |
49 switches::kAuraHostWindowUseFullscreen); | 49 switches::kAuraHostWindowUseFullscreen); |
50 | 50 |
51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
52 if (base::chromeos::IsRunningOnChromeOS()) | 52 if (base::chromeos::IsRunningOnChromeOS()) |
53 use_fullscreen = true; | 53 use_fullscreen = true; |
54 #endif | 54 #endif |
55 | 55 |
56 if (use_fullscreen) { | 56 if (use_fullscreen) { |
57 aura::MonitorManager::set_use_fullscreen_host_window(true); | 57 aura::DisplayManager::set_use_fullscreen_host_window(true); |
58 #if defined(OS_CHROMEOS) | 58 #if defined(OS_CHROMEOS) |
59 aura::RootWindow::set_hide_host_cursor(true); | 59 aura::RootWindow::set_hide_host_cursor(true); |
60 // Hide the mouse cursor completely at boot. | 60 // Hide the mouse cursor completely at boot. |
61 if (!chromeos::UserManager::Get()->IsUserLoggedIn()) | 61 if (!chromeos::UserManager::Get()->IsUserLoggedIn()) |
62 ash::Shell::set_initially_hide_cursor(true); | 62 ash::Shell::set_initially_hide_cursor(true); |
63 #endif | 63 #endif |
64 } | 64 } |
65 | 65 |
66 // Its easier to mark all windows as persisting and exclude the ones we care | 66 // Its easier to mark all windows as persisting and exclude the ones we care |
67 // about (browser windows), rather than explicitly excluding certain windows. | 67 // about (browser windows), rather than explicitly excluding certain windows. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #endif | 99 #endif |
100 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 100 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); |
101 } | 101 } |
102 | 102 |
103 void CloseAsh() { | 103 void CloseAsh() { |
104 if (ash::Shell::GetInstance()) | 104 if (ash::Shell::GetInstance()) |
105 ash::Shell::DeleteInstance(); | 105 ash::Shell::DeleteInstance(); |
106 } | 106 } |
107 | 107 |
108 } // namespace browser | 108 } // namespace browser |
OLD | NEW |