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