Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 2016073004: Show a visual indicator for the progress of auto-click. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/autoclick/autoclick_controller.h"
8 #include "ash/common/accessibility_types.h" 9 #include "ash/common/accessibility_types.h"
9 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
10 #include "ash/high_contrast/high_contrast_controller.h" 11 #include "ash/high_contrast/high_contrast_controller.h"
11 #include "ash/magnifier/magnification_controller.h" 12 #include "ash/magnifier/magnification_controller.h"
12 #include "ash/magnifier/partial_magnification_controller.h" 13 #include "ash/magnifier/partial_magnification_controller.h"
13 #include "ash/shell.h" 14 #include "ash/shell.h"
14 #include "ash/shell_init_params.h" 15 #include "ash/shell_init_params.h"
15 #include "base/command_line.h" 16 #include "base/command_line.h"
16 #include "base/sys_info.h" 17 #include "base/sys_info.h"
17 #include "build/build_config.h" 18 #include "build/build_config.h"
18 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/browser_process_platform_part.h" 20 #include "chrome/browser/browser_process_platform_part.h"
20 #include "chrome/browser/browser_shutdown.h" 21 #include "chrome/browser/browser_shutdown.h"
21 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 22 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
22 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 23 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
24 #include "chrome/browser/chromeos/ui/autoclick_ring_handler.h"
23 #include "chrome/browser/lifetime/application_lifetime.h" 25 #include "chrome/browser/lifetime/application_lifetime.h"
24 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" 26 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h"
25 #include "chrome/browser/ui/ash/chrome_shell_content_state.h" 27 #include "chrome/browser/ui/ash/chrome_shell_content_state.h"
26 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" 28 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
27 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" 29 #include "chrome/browser/ui/ash/ime_controller_chromeos.h"
28 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 30 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
29 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
30 #include "chromeos/accelerometer/accelerometer_reader.h" 32 #include "chromeos/accelerometer/accelerometer_reader.h"
31 #include "chromeos/chromeos_switches.h" 33 #include "chromeos/chromeos_switches.h"
32 #include "chromeos/login/login_state.h" 34 #include "chromeos/login/login_state.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 66
65 ash::ShellInitParams shell_init_params; 67 ash::ShellInitParams shell_init_params;
66 // Shell takes ownership of ChromeShellDelegate. 68 // Shell takes ownership of ChromeShellDelegate.
67 shell_init_params.delegate = new ChromeShellDelegate; 69 shell_init_params.delegate = new ChromeShellDelegate;
68 shell_init_params.context_factory = content::GetContextFactory(); 70 shell_init_params.context_factory = content::GetContextFactory();
69 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); 71 shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool();
70 72
71 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params); 73 ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params);
72 shell->accelerator_controller()->SetScreenshotDelegate( 74 shell->accelerator_controller()->SetScreenshotDelegate(
73 std::unique_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber)); 75 std::unique_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber));
76 shell->autoclick_controller()->SetDelegate(
77 base::WrapUnique(new chromeos::AutoclickRingHandler()));
74 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos. 78 // TODO(flackr): Investigate exposing a blocking pool task runner to chromeos.
75 chromeos::AccelerometerReader::GetInstance()->Initialize( 79 chromeos::AccelerometerReader::GetInstance()->Initialize(
76 content::BrowserThread::GetBlockingPool() 80 content::BrowserThread::GetBlockingPool()
77 ->GetSequencedTaskRunnerWithShutdownBehavior( 81 ->GetSequencedTaskRunnerWithShutdownBehavior(
78 content::BrowserThread::GetBlockingPool()->GetSequenceToken(), 82 content::BrowserThread::GetBlockingPool()->GetSequenceToken(),
79 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); 83 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
80 shell->accelerator_controller()->SetImeControlDelegate( 84 shell->accelerator_controller()->SetImeControlDelegate(
81 std::unique_ptr<ash::ImeControlDelegate>(new ImeController)); 85 std::unique_ptr<ash::ImeControlDelegate>(new ImeController));
82 shell->high_contrast_controller()->SetEnabled( 86 shell->high_contrast_controller()->SetEnabled(
83 chromeos::AccessibilityManager::Get()->IsHighContrastEnabled()); 87 chromeos::AccessibilityManager::Get()->IsHighContrastEnabled());
(...skipping 23 matching lines...) Expand all
107 } 111 }
108 112
109 void CloseAsh() { 113 void CloseAsh() {
110 if (ash::Shell::HasInstance()) { 114 if (ash::Shell::HasInstance()) {
111 ash::Shell::DeleteInstance(); 115 ash::Shell::DeleteInstance();
112 ash::ShellContentState::DestroyInstance(); 116 ash::ShellContentState::DestroyInstance();
113 } 117 }
114 } 118 }
115 119
116 } // namespace chrome 120 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/a11y_page/a11y_page.html ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698