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

Side by Side Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc

Issue 7862020: chromeos: Add operations to monitor the screen orientation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Move sensors source to chrome/browser/chromeos and update DEPS. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
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 "chrome/browser/ui/touch/frame/touch_browser_frame_view.h" 5 #include "chrome/browser/ui/touch/frame/touch_browser_frame_view.h"
6 6
7 #include "chrome/browser/ui/touch/animation/screen_rotation_setter.h" 7 #include "chrome/browser/ui/touch/animation/screen_rotation_setter.h"
8 #include "chrome/browser/ui/touch/keyboard/keyboard_manager.h" 8 #include "chrome/browser/ui/touch/keyboard/keyboard_manager.h"
9 #include "views/controls/button/image_button.h" 9 #include "views/controls/button/image_button.h"
10 #include "views/desktop/desktop_window_view.h" 10 #include "views/desktop/desktop_window_view.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 to_rotate = widget->GetRootView(); 101 to_rotate = widget->GetRootView();
102 } 102 }
103 103
104 if (!initialized_screen_rotation_) { 104 if (!initialized_screen_rotation_) {
105 to_rotate->SetPaintToLayer(true); 105 to_rotate->SetPaintToLayer(true);
106 to_rotate->SetLayerPropertySetter( 106 to_rotate->SetLayerPropertySetter(
107 ScreenRotationSetterFactory::Create(to_rotate)); 107 ScreenRotationSetterFactory::Create(to_rotate));
108 initialized_screen_rotation_ = true; 108 initialized_screen_rotation_ = true;
109 } 109 }
110 110
111 ui::Transform xform = SideToTransform(change.upward, 111 const ui::Transform& old_xform = to_rotate->GetTransform();
112 to_rotate->GetTransform(), 112 const ui::Transform& new_xform = SideToTransform(change.upward,
113 to_rotate->size()); 113 old_xform,
114 to_rotate->SetTransform(xform); 114 to_rotate->size());
115 if (old_xform != new_xform)
116 to_rotate->SetTransform(new_xform);
115 } 117 }
116
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698