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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Shell takes ownership of ChromeShellDelegate. | 61 // Shell takes ownership of ChromeShellDelegate. |
62 shell_init_params.delegate = new ChromeShellDelegate; | 62 shell_init_params.delegate = new ChromeShellDelegate; |
63 shell_init_params.context_factory = content::GetContextFactory(); | 63 shell_init_params.context_factory = content::GetContextFactory(); |
64 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); | 64 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); |
65 #if defined(OS_WIN) | 65 #if defined(OS_WIN) |
66 shell_init_params.remote_hwnd = remote_window; | 66 shell_init_params.remote_hwnd = remote_window; |
67 #endif | 67 #endif |
68 | 68 |
69 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params); | 69 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params); |
70 shell->accelerator_controller()->SetScreenshotDelegate( | 70 shell->accelerator_controller()->SetScreenshotDelegate( |
71 scoped_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber).Pass()); | 71 scoped_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber)); |
72 #if defined(OS_CHROMEOS) | 72 #if defined(OS_CHROMEOS) |
73 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. | 73 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. |
74 chromeos::AccelerometerReader::GetInstance()->Initialize( | 74 chromeos::AccelerometerReader::GetInstance()->Initialize( |
75 content::BrowserThread::GetBlockingPool() | 75 content::BrowserThread::GetBlockingPool() |
76 ->GetSequencedTaskRunnerWithShutdownBehavior( | 76 ->GetSequencedTaskRunnerWithShutdownBehavior( |
77 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), | 77 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), |
78 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | 78 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
79 shell->accelerator_controller()->SetImeControlDelegate( | 79 shell->accelerator_controller()->SetImeControlDelegate( |
80 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); | 80 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); |
81 shell->high_contrast_controller()->SetEnabled( | 81 shell->high_contrast_controller()->SetEnabled( |
(...skipping 18 matching lines...) Expand all Loading... |
100 } | 100 } |
101 | 101 |
102 void CloseAsh() { | 102 void CloseAsh() { |
103 if (ash::Shell::HasInstance()) { | 103 if (ash::Shell::HasInstance()) { |
104 ash::Shell::DeleteInstance(); | 104 ash::Shell::DeleteInstance(); |
105 ash::ShellContentState::DestroyInstance(); | 105 ash::ShellContentState::DestroyInstance(); |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 } // namespace chrome | 109 } // namespace chrome |
OLD | NEW |