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

Unified Diff: athena/system/orientation_controller.h

Issue 475533008: Revert of Rotate screen in response to accelerator or device orientation sensors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « athena/system/device_socket_listener.cc ('k') | athena/system/orientation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/system/orientation_controller.h
diff --git a/athena/system/orientation_controller.h b/athena/system/orientation_controller.h
deleted file mode 100644
index f6dc6a8336c22964f50630fff99960f0581cf31f..0000000000000000000000000000000000000000
--- a/athena/system/orientation_controller.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ATHENA_SYSTEM_ORIENTATION_CONTROLLER_H_
-#define ATHENA_SYSTEM_ORIENTATION_CONTROLLER_H_
-
-#include "athena/system/device_socket_listener.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "ui/gfx/display.h"
-
-namespace base {
-class FilePath;
-class FilePathWatcher;
-class TaskRunner;
-}
-
-namespace athena {
-
-// Monitors accelerometers, detecting orientation changes. When a change is
-// detected rotates the root window to match.
-class OrientationController
- : public DeviceSocketListener,
- public base::RefCountedThreadSafe<OrientationController> {
- public:
- OrientationController(scoped_refptr<base::TaskRunner> io_task_runner);
-
- private:
- friend class base::RefCountedThreadSafe<OrientationController>;
-
- virtual ~OrientationController();
-
- // Watch for the socket path to be created, called on the IO thread.
- void WatchForSocketPathOnIO();
- void OnFilePathChangedOnIO(const base::FilePath& path, bool error);
-
- // Overridden from device::DeviceSocketListener:
- virtual void OnDataAvailableOnIO(const void* data) OVERRIDE;
-
- // Rotates the display to |rotation|, called on the UI thread.
- void RotateOnUI(gfx::Display::Rotation rotation);
-
- // The last configured rotation.
- gfx::Display::Rotation current_rotation_;
-
- // The timestamp of the last applied orientation change.
- int64_t last_orientation_change_time_;
-
- // A task runner for the UI thread.
- scoped_refptr<base::TaskRunner> ui_task_runner_;
-
- // File path watcher used to detect when sensors are present.
- scoped_ptr<base::FilePathWatcher> watcher_;
-
- base::WeakPtrFactory<OrientationController> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(OrientationController);
-};
-
-} // namespace athena
-
-#endif // ATHENA_SYSTEM_ORIENTATION_CONTROLLER_H_
« no previous file with comments | « athena/system/device_socket_listener.cc ('k') | athena/system/orientation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698