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

Side by Side Diff: ui/aura/root_window.cc

Issue 13902003: Remove Event::system_location (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | ui/aura/test/event_generator.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 return; 1142 return;
1143 gfx::Point host_mouse_location = root_mouse_location; 1143 gfx::Point host_mouse_location = root_mouse_location;
1144 ConvertPointToHost(&host_mouse_location); 1144 ConvertPointToHost(&host_mouse_location);
1145 1145
1146 // TODO(derat|oshima): Don't use mouse_button_flags_ as it's 1146 // TODO(derat|oshima): Don't use mouse_button_flags_ as it's
1147 // currently broken. See/ crbug.com/107931. 1147 // currently broken. See/ crbug.com/107931.
1148 ui::MouseEvent event(ui::ET_MOUSE_MOVED, 1148 ui::MouseEvent event(ui::ET_MOUSE_MOVED,
1149 host_mouse_location, 1149 host_mouse_location,
1150 host_mouse_location, 1150 host_mouse_location,
1151 ui::EF_IS_SYNTHESIZED); 1151 ui::EF_IS_SYNTHESIZED);
1152 ConvertPointToNativeScreen(&root_mouse_location);
1153 event.set_system_location(root_mouse_location);
1154 OnHostMouseEvent(&event); 1152 OnHostMouseEvent(&event);
1155 } 1153 }
1156 1154
1157 gfx::Transform RootWindow::GetRootTransform() const { 1155 gfx::Transform RootWindow::GetRootTransform() const {
1158 float scale = ui::GetDeviceScaleFactor(layer()); 1156 float scale = ui::GetDeviceScaleFactor(layer());
1159 gfx::Transform transform; 1157 gfx::Transform transform;
1160 transform.Scale(scale, scale); 1158 transform.Scale(scale, scale);
1161 transform *= transformer_->GetTransform(); 1159 transform *= transformer_->GetTransform();
1162 return transform; 1160 return transform;
1163 } 1161 }
1164 1162
1165 gfx::Transform RootWindow::GetInverseRootTransform() const { 1163 gfx::Transform RootWindow::GetInverseRootTransform() const {
1166 float scale = ui::GetDeviceScaleFactor(layer()); 1164 float scale = ui::GetDeviceScaleFactor(layer());
1167 gfx::Transform transform; 1165 gfx::Transform transform;
1168 transform.Scale(1.0f / scale, 1.0f / scale); 1166 transform.Scale(1.0f / scale, 1.0f / scale);
1169 return transformer_->GetInverseTransform() * transform; 1167 return transformer_->GetInverseTransform() * transform;
1170 } 1168 }
1171 1169
1172 } // namespace aura 1170 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698