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

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: Rebased with fixed line endings in 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
« no previous file with comments | « chrome/browser/chromeos/sensors_source_chromeos.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 "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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 to_rotate = widget->GetRootView(); 102 to_rotate = widget->GetRootView();
103 } 103 }
104 104
105 if (!initialized_screen_rotation_) { 105 if (!initialized_screen_rotation_) {
106 to_rotate->SetPaintToLayer(true); 106 to_rotate->SetPaintToLayer(true);
107 to_rotate->SetLayerPropertySetter( 107 to_rotate->SetLayerPropertySetter(
108 ScreenRotationSetterFactory::Create(to_rotate)); 108 ScreenRotationSetterFactory::Create(to_rotate));
109 initialized_screen_rotation_ = true; 109 initialized_screen_rotation_ = true;
110 } 110 }
111 111
112 ui::Transform xform = SideToTransform(change.upward, 112 const ui::Transform& old_xform = to_rotate->GetTransform();
113 to_rotate->GetTransform(), 113 const ui::Transform& new_xform = SideToTransform(change.upward,
114 to_rotate->size()); 114 old_xform,
115 115 to_rotate->size());
116 to_rotate->SetTransform(xform); 116 if (old_xform != new_xform)
117 to_rotate->SetTransform(new_xform);
117 } 118 }
118
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/sensors_source_chromeos.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698