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

Unified Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.h

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Use new minimal sensor API Created 9 years, 5 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: chrome/browser/ui/touch/frame/touch_browser_frame_view.h
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
index 6f02128ae938f38461a7dcfa2c11c645494b5d12..e86962ab892596d96166dfb193cc839909839a0b 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
@@ -8,9 +8,12 @@
#include "chrome/browser/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
+#include "content/browser/sensors/provider.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
+#include "content/common/sensors.h"
#include "ui/base/animation/animation_delegate.h"
+#include "ui/base/animation/slide_animation.h"
sadrul 2011/07/15 15:25:48 Forward declaration is generally preferred over in
#include "views/focus/focus_manager.h"
#if defined(OS_CHROMEOS)
@@ -23,10 +26,6 @@ class KeyboardContainerView;
class NotificationDetails;
class NotificationSource;
-namespace ui {
-class SlideAnimation;
-}
-
class TouchBrowserFrameView
: public OpaqueBrowserFrameView,
public views::FocusChangeListener,
@@ -35,7 +34,8 @@ class TouchBrowserFrameView
public
chromeos::input_method::InputMethodManager::VirtualKeyboardObserver,
#endif
- public ui::AnimationDelegate {
+ public ui::AnimationDelegate,
+ public sensors::Listener {
public:
enum VirtualKeyboardType {
NONE,
@@ -68,6 +68,10 @@ class TouchBrowserFrameView
const std::string& virtual_keyboard_layout);
#endif
+ // sensors::Listener implementation
+ virtual void OnScreenOrientationChange(
+ const sensors::ScreenOrientation& change) OVERRIDE;
+
protected:
// Overridden from OpaqueBrowserFrameView
virtual int GetReservedHeight() const;
@@ -102,6 +106,7 @@ class TouchBrowserFrameView
bool focus_listener_added_;
KeyboardContainerView* keyboard_;
NotificationRegistrar registrar_;
+ sensors::ScreenOrientation::Side up_;
scoped_ptr<ui::SlideAnimation> animation_;

Powered by Google App Engine
This is Rietveld 408576698