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_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
8 #include "ash/autoclick/autoclick_controller.h" | 8 #include "ash/autoclick/autoclick_controller.h" |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/browser_process_platform_part.h" | 22 #include "chrome/browser/browser_process_platform_part.h" |
23 #include "chrome/browser/browser_shutdown.h" | 23 #include "chrome/browser/browser_shutdown.h" |
24 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 24 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
25 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 25 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
26 #include "chrome/browser/chromeos/ui/autoclick_ring_handler.h" | 26 #include "chrome/browser/chromeos/ui/autoclick_ring_handler.h" |
27 #include "chrome/browser/lifetime/application_lifetime.h" | 27 #include "chrome/browser/lifetime/application_lifetime.h" |
28 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" | 28 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" |
29 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" | 29 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" |
30 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 30 #include "chrome/browser/ui/ash/chrome_shell_delegate.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/launcher/chrome_launcher_controller_mus.h" |
32 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 33 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
33 #include "chrome/common/chrome_switches.h" | 34 #include "chrome/common/chrome_switches.h" |
34 #include "chromeos/accelerometer/accelerometer_reader.h" | 35 #include "chromeos/accelerometer/accelerometer_reader.h" |
35 #include "chromeos/chromeos_switches.h" | 36 #include "chromeos/chromeos_switches.h" |
36 #include "chromeos/login/login_state.h" | 37 #include "chromeos/login/login_state.h" |
37 #include "content/public/browser/browser_thread.h" | 38 #include "content/public/browser/browser_thread.h" |
38 #include "content/public/browser/context_factory.h" | 39 #include "content/public/browser/context_factory.h" |
39 #include "ui/aura/env.h" | 40 #include "ui/aura/env.h" |
40 #include "ui/aura/window_tree_host.h" | 41 #include "ui/aura/window_tree_host.h" |
41 | 42 |
42 #if defined(USE_X11) | 43 #if defined(USE_X11) |
43 #include "ui/base/x/x11_util.h" | 44 #include "ui/base/x/x11_util.h" |
44 #endif | 45 #endif |
45 | 46 |
46 #if defined(MOJO_SHELL_CLIENT) | |
47 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" | |
48 #endif | |
49 | |
50 namespace chrome { | 47 namespace chrome { |
51 | 48 |
52 void OpenAsh(gfx::AcceleratedWidget remote_window) { | 49 void OpenAsh(gfx::AcceleratedWidget remote_window) { |
53 #if defined(USE_X11) | 50 #if defined(USE_X11) |
54 if (base::SysInfo::IsRunningOnChromeOS()) { | 51 if (base::SysInfo::IsRunningOnChromeOS()) { |
55 // Hides the cursor outside of the Aura root window. The cursor will be | 52 // Hides the cursor outside of the Aura root window. The cursor will be |
56 // drawn within the Aura root window, and it'll remain hidden after the | 53 // drawn within the Aura root window, and it'll remain hidden after the |
57 // Aura window is closed. | 54 // Aura window is closed. |
58 ui::HideHostCursor(); | 55 ui::HideHostCursor(); |
59 } | 56 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); | 96 magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); |
100 | 97 |
101 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 98 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
102 switches::kDisableZeroBrowsersOpenForTests)) { | 99 switches::kDisableZeroBrowsersOpenForTests)) { |
103 g_browser_process->platform_part()->RegisterKeepAlive(); | 100 g_browser_process->platform_part()->RegisterKeepAlive(); |
104 } | 101 } |
105 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 102 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
106 } | 103 } |
107 | 104 |
108 void InitializeMash() { | 105 void InitializeMash() { |
109 #if defined(MOJO_SHELL_CLIENT) | |
110 DCHECK(!ash::Shell::HasInstance()); | 106 DCHECK(!ash::Shell::HasInstance()); |
111 ChromeLauncherControllerMus::CreateInstance()->Init(); | 107 ChromeLauncherControllerMus::CreateInstance()->Init(); |
112 #endif | |
113 } | 108 } |
114 | 109 |
115 void CloseAsh() { | 110 void CloseAsh() { |
116 if (ash::Shell::HasInstance()) { | 111 if (ash::Shell::HasInstance()) { |
117 ash::Shell::DeleteInstance(); | 112 ash::Shell::DeleteInstance(); |
118 ash::ShellContentState::DestroyInstance(); | 113 ash::ShellContentState::DestroyInstance(); |
119 } | 114 } |
120 } | 115 } |
121 | 116 |
122 } // namespace chrome | 117 } // namespace chrome |
OLD | NEW |