Chromium Code Reviews| 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/accelerometer/accelerometer_controller.h" | 8 #include "ash/accelerometer/accelerometer_controller.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/high_contrast/high_contrast_controller.h" | 10 #include "ash/high_contrast/high_contrast_controller.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 // Shell takes ownership of ChromeShellDelegate. | 64 // Shell takes ownership of ChromeShellDelegate. |
| 65 shell_init_params.delegate = new ChromeShellDelegate; | 65 shell_init_params.delegate = new ChromeShellDelegate; |
| 66 shell_init_params.context_factory = content::GetContextFactory(); | 66 shell_init_params.context_factory = content::GetContextFactory(); |
| 67 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
| 68 shell_init_params.remote_hwnd = remote_window; | 68 shell_init_params.remote_hwnd = remote_window; |
| 69 #endif | 69 #endif |
| 70 | 70 |
| 71 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params); | 71 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params); |
| 72 shell->accelerator_controller()->SetScreenshotDelegate( | 72 shell->accelerator_controller()->SetScreenshotDelegate( |
| 73 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); | 73 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); |
| 74 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. | |
| 75 shell->accelerometer_controller()->Initialize( | 74 shell->accelerometer_controller()->Initialize( |
| 76 content::BrowserThread::GetBlockingPool()-> | 75 content::BrowserThread::GetMessageLoopProxyForThread( |
| 77 GetTaskRunnerWithShutdownBehavior( | 76 content::BrowserThread::FILE)); |
|
oshima
2014/09/16 21:27:16
FILE thread is obsolete and we should use Blocking
flackr
2014/09/16 22:19:23
Done, and updated athena/ except for AthenaTestHel
| |
| 78 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | |
| 79 #if defined(OS_CHROMEOS) | 77 #if defined(OS_CHROMEOS) |
| 80 shell->accelerator_controller()->SetImeControlDelegate( | 78 shell->accelerator_controller()->SetImeControlDelegate( |
| 81 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); | 79 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); |
| 82 shell->high_contrast_controller()->SetEnabled( | 80 shell->high_contrast_controller()->SetEnabled( |
| 83 chromeos::AccessibilityManager::Get()->IsHighContrastEnabled()); | 81 chromeos::AccessibilityManager::Get()->IsHighContrastEnabled()); |
| 84 | 82 |
| 85 DCHECK(chromeos::MagnificationManager::Get()); | 83 DCHECK(chromeos::MagnificationManager::Get()); |
| 86 bool magnifier_enabled = | 84 bool magnifier_enabled = |
| 87 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); | 85 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); |
| 88 ash::MagnifierType magnifier_type = | 86 ash::MagnifierType magnifier_type = |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 99 #endif | 97 #endif |
| 100 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 98 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
| 101 } | 99 } |
| 102 | 100 |
| 103 void CloseAsh() { | 101 void CloseAsh() { |
| 104 if (ash::Shell::HasInstance()) | 102 if (ash::Shell::HasInstance()) |
| 105 ash::Shell::DeleteInstance(); | 103 ash::Shell::DeleteInstance(); |
| 106 } | 104 } |
| 107 | 105 |
| 108 } // namespace chrome | 106 } // namespace chrome |
| OLD | NEW |