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/accelerators/accelerator_controller_delegate_aura.h" | 8 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
9 #include "ash/accessibility_types.h" | 9 #include "ash/accessibility_types.h" |
10 #include "ash/aura/wm_shell_aura.h" | 10 #include "ash/aura/shell_port_classic.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/mus/bridge/wm_shell_mus.h" | 14 #include "ash/mus/bridge/shell_port_mash.h" |
15 #include "ash/mus/window_manager.h" | 15 #include "ash/mus/window_manager.h" |
16 #include "ash/public/cpp/config.h" | 16 #include "ash/public/cpp/config.h" |
17 #include "ash/shell.h" | 17 #include "ash/shell.h" |
18 #include "ash/shell_init_params.h" | 18 #include "ash/shell_init_params.h" |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/memory/ptr_util.h" | 20 #include "base/memory/ptr_util.h" |
21 #include "base/sys_info.h" | 21 #include "base/sys_info.h" |
22 #include "base/threading/sequenced_worker_pool.h" | 22 #include "base/threading/sequenced_worker_pool.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 window_manager_ = CreateMusShell(); | 103 window_manager_ = CreateMusShell(); |
104 else | 104 else |
105 CreateClassicShell(); | 105 CreateClassicShell(); |
106 | 106 |
107 ash::Shell* shell = ash::Shell::Get(); | 107 ash::Shell* shell = ash::Shell::Get(); |
108 | 108 |
109 ash::AcceleratorControllerDelegateAura* accelerator_controller_delegate = | 109 ash::AcceleratorControllerDelegateAura* accelerator_controller_delegate = |
110 nullptr; | 110 nullptr; |
111 if (chromeos::GetAshConfig() == ash::Config::CLASSIC) { | 111 if (chromeos::GetAshConfig() == ash::Config::CLASSIC) { |
112 accelerator_controller_delegate = | 112 accelerator_controller_delegate = |
113 ash::WmShellAura::Get()->accelerator_controller_delegate(); | 113 ash::ShellPortClassic::Get()->accelerator_controller_delegate(); |
114 } else if (chromeos::GetAshConfig() == ash::Config::MUS) { | 114 } else if (chromeos::GetAshConfig() == ash::Config::MUS) { |
115 accelerator_controller_delegate = | 115 accelerator_controller_delegate = |
116 ash::mus::WmShellMus::Get()->accelerator_controller_delegate_mus(); | 116 ash::mus::ShellPortMash::Get()->accelerator_controller_delegate_mus(); |
117 } | 117 } |
118 if (accelerator_controller_delegate) { | 118 if (accelerator_controller_delegate) { |
119 std::unique_ptr<ChromeScreenshotGrabber> screenshot_delegate = | 119 std::unique_ptr<ChromeScreenshotGrabber> screenshot_delegate = |
120 base::MakeUnique<ChromeScreenshotGrabber>(); | 120 base::MakeUnique<ChromeScreenshotGrabber>(); |
121 accelerator_controller_delegate->SetScreenshotDelegate( | 121 accelerator_controller_delegate->SetScreenshotDelegate( |
122 std::move(screenshot_delegate)); | 122 std::move(screenshot_delegate)); |
123 } | 123 } |
124 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. | 124 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. |
125 chromeos::AccelerometerReader::GetInstance()->Initialize( | 125 chromeos::AccelerometerReader::GetInstance()->Initialize( |
126 content::BrowserThread::GetBlockingPool() | 126 content::BrowserThread::GetBlockingPool() |
(...skipping 22 matching lines...) Expand all Loading... |
149 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 149 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
150 } | 150 } |
151 | 151 |
152 AshInit::~AshInit() { | 152 AshInit::~AshInit() { |
153 // |window_manager_| deletes the Shell. | 153 // |window_manager_| deletes the Shell. |
154 if (!window_manager_ && ash::Shell::HasInstance()) { | 154 if (!window_manager_ && ash::Shell::HasInstance()) { |
155 ash::Shell::DeleteInstance(); | 155 ash::Shell::DeleteInstance(); |
156 ash::ShellContentState::DestroyInstance(); | 156 ash::ShellContentState::DestroyInstance(); |
157 } | 157 } |
158 } | 158 } |
OLD | NEW |