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

Unified Diff: views/desktop/desktop_window_view.cc

Issue 8402002: Reenable triggering of screen rotations by sensors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gardening Created 9 years, 1 month 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 | « views/desktop/desktop_window_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/desktop/desktop_window_view.cc
diff --git a/views/desktop/desktop_window_view.cc b/views/desktop/desktop_window_view.cc
index 94fda7dd1b604da31ba8691f13659e02bbd84b37..9ad146c7bb3f7d60e5cdfbb7e8a2043c1fed6485 100644
--- a/views/desktop/desktop_window_view.cc
+++ b/views/desktop/desktop_window_view.cc
@@ -269,5 +269,27 @@ NonClientFrameView* DesktopWindowView::CreateNonClientFrameView() {
return NULL;
}
+////////////////////////////////////////////////////////////////////////////////
+// ui::LayerAnimationObserver Implementation:
+
+void DesktopWindowView::OnLayerAnimationEnded(
+ const ui::LayerAnimationSequence* animation) {
+ // The layer, and all the observers should be notified of the
+ // transformed size of the desktop.
+ if (widget_) {
+ gfx::Rect current_bounds(widget_->GetClientAreaScreenBounds().size());
+ layer()->transform().TransformRect(&current_bounds);
+ SetBoundsRect(gfx::Rect(current_bounds.size()));
+ }
+}
+
+void DesktopWindowView::OnLayerAnimationScheduled(
+ const ui::LayerAnimationSequence* animation) {
+}
+
+void DesktopWindowView::OnLayerAnimationAborted(
+ const ui::LayerAnimationSequence* animation) {
+}
+
} // namespace desktop
} // namespace views
« no previous file with comments | « views/desktop/desktop_window_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698