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" |
11 #include "ash/common/ash_switches.h" | 11 #include "ash/common/ash_switches.h" |
| 12 #include "ash/common/wm_shell.h" |
12 #include "ash/high_contrast/high_contrast_controller.h" | 13 #include "ash/high_contrast/high_contrast_controller.h" |
13 #include "ash/magnifier/magnification_controller.h" | 14 #include "ash/magnifier/magnification_controller.h" |
14 #include "ash/magnifier/partial_magnification_controller.h" | 15 #include "ash/magnifier/partial_magnification_controller.h" |
15 #include "ash/shell.h" | 16 #include "ash/shell.h" |
16 #include "ash/shell_init_params.h" | 17 #include "ash/shell_init_params.h" |
17 #include "base/command_line.h" | 18 #include "base/command_line.h" |
18 #include "base/sys_info.h" | 19 #include "base/sys_info.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
20 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
21 #include "chrome/browser/browser_process_platform_part.h" | 22 #include "chrome/browser/browser_process_platform_part.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 shell->accelerator_controller_delegate()->SetScreenshotDelegate( | 76 shell->accelerator_controller_delegate()->SetScreenshotDelegate( |
76 std::unique_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber)); | 77 std::unique_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber)); |
77 shell->autoclick_controller()->SetDelegate( | 78 shell->autoclick_controller()->SetDelegate( |
78 base::WrapUnique(new chromeos::AutoclickRingHandler())); | 79 base::WrapUnique(new chromeos::AutoclickRingHandler())); |
79 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. | 80 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. |
80 chromeos::AccelerometerReader::GetInstance()->Initialize( | 81 chromeos::AccelerometerReader::GetInstance()->Initialize( |
81 content::BrowserThread::GetBlockingPool() | 82 content::BrowserThread::GetBlockingPool() |
82 ->GetSequencedTaskRunnerWithShutdownBehavior( | 83 ->GetSequencedTaskRunnerWithShutdownBehavior( |
83 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), | 84 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), |
84 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | 85 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
85 shell->accelerator_controller()->SetImeControlDelegate( | 86 ash::WmShell::Get()->accelerator_controller()->SetImeControlDelegate( |
86 std::unique_ptr<ash::ImeControlDelegate>(new ImeController)); | 87 std::unique_ptr<ash::ImeControlDelegate>(new ImeController)); |
87 shell->high_contrast_controller()->SetEnabled( | 88 shell->high_contrast_controller()->SetEnabled( |
88 chromeos::AccessibilityManager::Get()->IsHighContrastEnabled()); | 89 chromeos::AccessibilityManager::Get()->IsHighContrastEnabled()); |
89 | 90 |
90 DCHECK(chromeos::MagnificationManager::Get()); | 91 DCHECK(chromeos::MagnificationManager::Get()); |
91 bool magnifier_enabled = | 92 bool magnifier_enabled = |
92 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); | 93 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); |
93 ash::MagnifierType magnifier_type = | 94 ash::MagnifierType magnifier_type = |
94 chromeos::MagnificationManager::Get()->GetMagnifierType(); | 95 chromeos::MagnificationManager::Get()->GetMagnifierType(); |
95 shell->magnification_controller()->SetEnabled( | 96 shell->magnification_controller()->SetEnabled( |
(...skipping 16 matching lines...) Expand all Loading... |
112 } | 113 } |
113 | 114 |
114 void CloseAsh() { | 115 void CloseAsh() { |
115 if (ash::Shell::HasInstance()) { | 116 if (ash::Shell::HasInstance()) { |
116 ash::Shell::DeleteInstance(); | 117 ash::Shell::DeleteInstance(); |
117 ash::ShellContentState::DestroyInstance(); | 118 ash::ShellContentState::DestroyInstance(); |
118 } | 119 } |
119 } | 120 } |
120 | 121 |
121 } // namespace chrome | 122 } // namespace chrome |
OLD | NEW |