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/common/accelerators/accelerator_controller.h" | 8 #include "ash/common/accelerators/accelerator_controller.h" |
9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
11 #include "ash/high_contrast/high_contrast_controller.h" | 11 #include "ash/high_contrast/high_contrast_controller.h" |
12 #include "ash/magnifier/magnification_controller.h" | 12 #include "ash/magnifier/magnification_controller.h" |
13 #include "ash/magnifier/partial_magnification_controller.h" | 13 #include "ash/magnifier/partial_magnification_controller.h" |
14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
15 #include "ash/shell_init_params.h" | 15 #include "ash/shell_init_params.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/sys_info.h" | 17 #include "base/sys_info.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/browser_process_platform_part.h" | 20 #include "chrome/browser/browser_process_platform_part.h" |
21 #include "chrome/browser/browser_shutdown.h" | 21 #include "chrome/browser/browser_shutdown.h" |
22 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 22 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
23 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 23 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
24 #include "chrome/browser/lifetime/application_lifetime.h" | 24 #include "chrome/browser/lifetime/application_lifetime.h" |
25 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" | 25 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" |
26 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" | 26 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" |
27 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 27 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
28 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" | 28 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" |
29 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_mus.h" | |
30 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 29 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
31 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
32 #include "chromeos/accelerometer/accelerometer_reader.h" | 31 #include "chromeos/accelerometer/accelerometer_reader.h" |
33 #include "chromeos/chromeos_switches.h" | 32 #include "chromeos/chromeos_switches.h" |
34 #include "chromeos/login/login_state.h" | 33 #include "chromeos/login/login_state.h" |
35 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
36 #include "content/public/browser/context_factory.h" | 35 #include "content/public/browser/context_factory.h" |
37 #include "ui/aura/env.h" | 36 #include "ui/aura/env.h" |
38 #include "ui/aura/window_tree_host.h" | 37 #include "ui/aura/window_tree_host.h" |
39 | 38 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 shell->partial_magnification_controller()->SetEnabled( | 89 shell->partial_magnification_controller()->SetEnabled( |
91 magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); | 90 magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); |
92 | 91 |
93 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 92 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
94 switches::kDisableZeroBrowsersOpenForTests)) { | 93 switches::kDisableZeroBrowsersOpenForTests)) { |
95 g_browser_process->platform_part()->RegisterKeepAlive(); | 94 g_browser_process->platform_part()->RegisterKeepAlive(); |
96 } | 95 } |
97 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 96 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
98 } | 97 } |
99 | 98 |
100 void InitializeMash() { | |
101 DCHECK(!ash::Shell::HasInstance()); | |
102 ChromeLauncherControllerMus::CreateInstance()->Init(); | |
103 } | |
104 | |
105 void CloseAsh() { | 99 void CloseAsh() { |
106 if (ash::Shell::HasInstance()) { | 100 if (ash::Shell::HasInstance()) { |
107 ash::Shell::DeleteInstance(); | 101 ash::Shell::DeleteInstance(); |
108 ash::ShellContentState::DestroyInstance(); | 102 ash::ShellContentState::DestroyInstance(); |
109 } | 103 } |
110 } | 104 } |
111 | 105 |
112 } // namespace chrome | 106 } // namespace chrome |
OLD | NEW |