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

Unified Diff: ash/display/display_manager.h

Issue 196413017: Auto rotate on lid rotation changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stick to current rotation and add tests. Created 6 years, 9 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
Index: ash/display/display_manager.h
diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h
index c67252498dab9f93b4ab9ebfaccb324d9a1fadd1..878e4bac3c5198711bf60fa25ee6eed454e6d0c3 100644
--- a/ash/display/display_manager.h
+++ b/ash/display/display_manager.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "ash/accelerometer/accelerometer_observer.h"
#include "ash/ash_export.h"
#include "ash/display/display_info.h"
#include "ash/display/display_layout.h"
@@ -25,6 +26,7 @@ class Display;
class Insets;
class Rect;
class Screen;
+class Vector3dF;
}
namespace ash {
@@ -43,11 +45,11 @@ class DisplayLayoutStore;
// and notifies observers when configuration changes.
//
// TODO(oshima): Make this non internal.
-class ASH_EXPORT DisplayManager
+class ASH_EXPORT DisplayManager :
#if defined(OS_CHROMEOS)
- : public ui::OutputConfigurator::SoftwareMirroringController
+ public ui::OutputConfigurator::SoftwareMirroringController,
#endif
- {
+ public ash::AccelerometerObserver {
public:
class ASH_EXPORT Delegate {
public:
@@ -279,6 +281,10 @@ class ASH_EXPORT DisplayManager
// Create a screen instance to be used during shutdown.
void CreateScreenForShutdown() const;
+ // ash::AccelerometerObserver:
+ virtual void OnAccelerometerUpdated(const gfx::Vector3dF& base,
+ const gfx::Vector3dF& lid) OVERRIDE;
oshima 2014/04/01 00:57:03 Hmm, I don't think this should belong here. (I sho
flackr 2014/04/01 01:46:31 Okay, so something else to observe accelerometer u
oshima 2014/04/01 14:52:50 sgtm. I don't have strong preference as to where/w
+
private:
FRIEND_TEST_ALL_PREFIXES(ExtendedDesktopTest, ConvertPoint);
FRIEND_TEST_ALL_PREFIXES(DisplayManagerTest, TestNativeDisplaysChanged);

Powered by Google App Engine
This is Rietveld 408576698