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 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 31 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
32 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 32 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
33 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" | 33 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" |
34 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 34 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
35 #include "chromeos/accelerometer/accelerometer_reader.h" | 35 #include "chromeos/accelerometer/accelerometer_reader.h" |
36 #include "chromeos/chromeos_switches.h" | 36 #include "chromeos/chromeos_switches.h" |
37 #include "chromeos/login/login_state.h" | 37 #include "chromeos/login/login_state.h" |
38 #include "ui/base/x/x11_util.h" | 38 #include "ui/base/x/x11_util.h" |
39 #endif | 39 #endif |
40 | 40 |
| 41 #if defined(MOJO_SHELL_CLIENT) |
| 42 #include "chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.h" |
| 43 #endif |
| 44 |
41 namespace chrome { | 45 namespace chrome { |
42 | 46 |
43 void OpenAsh(gfx::AcceleratedWidget remote_window) { | 47 void OpenAsh(gfx::AcceleratedWidget remote_window) { |
44 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
45 #if defined(USE_X11) | 49 #if defined(USE_X11) |
46 if (base::SysInfo::IsRunningOnChromeOS()) { | 50 if (base::SysInfo::IsRunningOnChromeOS()) { |
47 // Hides the cursor outside of the Aura root window. The cursor will be | 51 // Hides the cursor outside of the Aura root window. The cursor will be |
48 // drawn within the Aura root window, and it'll remain hidden after the | 52 // drawn within the Aura root window, and it'll remain hidden after the |
49 // Aura window is closed. | 53 // Aura window is closed. |
50 ui::HideHostCursor(); | 54 ui::HideHostCursor(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 SetEnabled(magnifier_enabled && magnifier_type == ui::MAGNIFIER_PARTIAL); | 98 SetEnabled(magnifier_enabled && magnifier_type == ui::MAGNIFIER_PARTIAL); |
95 | 99 |
96 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 100 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
97 switches::kDisableZeroBrowsersOpenForTests)) { | 101 switches::kDisableZeroBrowsersOpenForTests)) { |
98 g_browser_process->platform_part()->RegisterKeepAlive(); | 102 g_browser_process->platform_part()->RegisterKeepAlive(); |
99 } | 103 } |
100 #endif | 104 #endif |
101 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 105 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
102 } | 106 } |
103 | 107 |
| 108 void InitializeMash() { |
| 109 #if defined(MOJO_SHELL_CLIENT) |
| 110 DCHECK(!ash::Shell::HasInstance()); |
| 111 ChromeMashShelfController::CreateInstance(); |
| 112 #endif |
| 113 } |
| 114 |
104 void CloseAsh() { | 115 void CloseAsh() { |
105 if (ash::Shell::HasInstance()) { | 116 if (ash::Shell::HasInstance()) { |
106 ash::Shell::DeleteInstance(); | 117 ash::Shell::DeleteInstance(); |
107 ash::ShellContentState::DestroyInstance(); | 118 ash::ShellContentState::DestroyInstance(); |
108 } | 119 } |
109 } | 120 } |
110 | 121 |
111 } // namespace chrome | 122 } // namespace chrome |
OLD | NEW |