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

Unified Diff: chrome/browser/ui/ash/ash_init.cc

Issue 795333002: Refactor AccelerometerReader to provide an Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/ash_init.cc
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index b0e67ef04afe04e717fe6dfbae5b778b9868749f..6b0542ae69a7e6838c461bd7766b819bfcd48320 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/ash/ash_init.h"
#include "ash/accelerators/accelerator_controller.h"
-#include "ash/accelerometer/accelerometer_controller.h"
#include "ash/ash_switches.h"
#include "ash/high_contrast/high_contrast_controller.h"
#include "ash/magnifier/magnification_controller.h"
@@ -29,6 +28,7 @@
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/ui/ash/ime_controller_chromeos.h"
#include "chrome/browser/ui/ash/volume_controller_chromeos.h"
+#include "chromeos/accelerometer/accelerometer_reader.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/login/login_state.h"
#include "ui/base/x/x11_util.h"
@@ -63,12 +63,12 @@ void OpenAsh(gfx::AcceleratedWidget remote_window) {
ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params);
shell->accelerator_controller()->SetScreenshotDelegate(
scoped_ptr<ash::ScreenshotDelegate>(new ChromeScreenshotGrabber).Pass());
+#if defined(OS_CHROMEOS)
// TODO(flackr): Investigate exposing a blocking pool task runner to chromeos.
- shell->accelerometer_controller()->Initialize(
- content::BrowserThread::GetBlockingPool()->
- GetTaskRunnerWithShutdownBehavior(
+ shell->accelerometer_reader()->Initialize(
+ content::BrowserThread::GetBlockingPool()
+ ->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
-#if defined(OS_CHROMEOS)
shell->accelerator_controller()->SetImeControlDelegate(
scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
shell->high_contrast_controller()->SetEnabled(

Powered by Google App Engine
This is Rietveld 408576698