| OLD | NEW |
| 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 Loading... |
| 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 | |
| OLD | NEW |