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

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

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Should pass trybots this time Created 8 years, 2 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
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.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/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 aura::client::GetScreenPositionClient(root); 261 aura::client::GetScreenPositionClient(root);
262 if (screen_position_client) { 262 if (screen_position_client) {
263 gfx::Point origin = bounds.origin(); 263 gfx::Point origin = bounds.origin();
264 screen_position_client->ConvertPointToScreen(root, &origin); 264 screen_position_client->ConvertPointToScreen(root, &origin);
265 bounds.set_origin(origin); 265 bounds.set_origin(origin);
266 } 266 }
267 } 267 }
268 return bounds; 268 return bounds;
269 } 269 }
270 270
271 void Window::SetTransform(const ui::Transform& transform) { 271 void Window::SetTransform(const gfx::Transform& transform) {
272 RootWindow* root_window = GetRootWindow(); 272 RootWindow* root_window = GetRootWindow();
273 bool contained_mouse = IsVisible() && root_window && 273 bool contained_mouse = IsVisible() && root_window &&
274 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); 274 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot());
275 layer()->SetTransform(transform); 275 layer()->SetTransform(transform);
276 if (root_window) 276 if (root_window)
277 root_window->OnWindowTransformed(this, contained_mouse); 277 root_window->OnWindowTransformed(this, contained_mouse);
278 } 278 }
279 279
280 void Window::SetLayoutManager(LayoutManager* layout_manager) { 280 void Window::SetLayoutManager(LayoutManager* layout_manager) {
281 if (layout_manager == layout_manager_.get()) 281 if (layout_manager == layout_manager_.get())
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 bool contains_mouse = false; 973 bool contains_mouse = false;
974 if (IsVisible()) { 974 if (IsVisible()) {
975 RootWindow* root_window = GetRootWindow(); 975 RootWindow* root_window = GetRootWindow();
976 contains_mouse = root_window && 976 contains_mouse = root_window &&
977 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); 977 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot());
978 } 978 }
979 return contains_mouse; 979 return contains_mouse;
980 } 980 }
981 981
982 } // namespace aura 982 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698