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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/desktop/desktop_window_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/desktop/desktop_window_view.h" 5 #include "views/desktop/desktop_window_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "ui/gfx/transform.h" 9 #include "ui/gfx/transform.h"
10 #include "ui/gfx/compositor/layer.h" 10 #include "ui/gfx/compositor/layer.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 case DESKTOP_DEFAULT: 262 case DESKTOP_DEFAULT:
263 case DESKTOP_NETBOOK: 263 case DESKTOP_NETBOOK:
264 return NULL; 264 return NULL;
265 265
266 case DESKTOP_OTHER: 266 case DESKTOP_OTHER:
267 return new NativeFrameView(widget_); 267 return new NativeFrameView(widget_);
268 } 268 }
269 return NULL; 269 return NULL;
270 } 270 }
271 271
272 ////////////////////////////////////////////////////////////////////////////////
273 // ui::LayerAnimationObserver Implementation:
274
275 void DesktopWindowView::OnLayerAnimationEnded(
276 const ui::LayerAnimationSequence* animation) {
277 // The layer, and all the observers should be notified of the
278 // transformed size of the desktop.
279 if (widget_) {
280 gfx::Rect current_bounds(widget_->GetClientAreaScreenBounds().size());
281 layer()->transform().TransformRect(&current_bounds);
282 SetBoundsRect(gfx::Rect(current_bounds.size()));
283 }
284 }
285
286 void DesktopWindowView::OnLayerAnimationScheduled(
287 const ui::LayerAnimationSequence* animation) {
288 }
289
290 void DesktopWindowView::OnLayerAnimationAborted(
291 const ui::LayerAnimationSequence* animation) {
292 }
293
272 } // namespace desktop 294 } // namespace desktop
273 } // namespace views 295 } // namespace views
OLDNEW
« 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