| 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/views/widget/desktop_native_widget_helper_aura.h" | 5 #include "ui/views/widget/desktop_native_widget_helper_aura.h" |
| 6 | 6 |
| 7 #include "ui/aura/client/dispatcher_client.h" | 7 #include "ui/aura/client/dispatcher_client.h" |
| 8 #include "ui/aura/client/screen_position_client.h" | 8 #include "ui/aura/client/screen_position_client.h" |
| 9 #include "ui/aura/desktop/desktop_activation_client.h" | 9 #include "ui/aura/desktop/desktop_activation_client.h" |
| 10 #include "ui/aura/desktop/desktop_cursor_client.h" | 10 #include "ui/aura/desktop/desktop_cursor_client.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void ConvertPointFromScreen(const aura::Window* window, | 54 virtual void ConvertPointFromScreen(const aura::Window* window, |
| 55 gfx::Point* point) OVERRIDE { | 55 gfx::Point* point) OVERRIDE { |
| 56 const aura::RootWindow* root_window = window->GetRootWindow(); | 56 const aura::RootWindow* root_window = window->GetRootWindow(); |
| 57 gfx::Point origin = root_window->GetHostOrigin(); | 57 gfx::Point origin = root_window->GetHostOrigin(); |
| 58 point->Offset(-origin.x(), -origin.y()); | 58 point->Offset(-origin.x(), -origin.y()); |
| 59 aura::Window::ConvertPointToTarget(root_window, window, point); | 59 aura::Window::ConvertPointToTarget(root_window, window, point); |
| 60 } | 60 } |
| 61 | 61 |
| 62 virtual void ConvertNativePointToScreen(aura::Window* window, |
| 63 gfx::Point* point) OVERRIDE { |
| 64 ConvertPointToScreen(window, point); |
| 65 } |
| 66 |
| 62 virtual void SetBounds(aura::Window* window, | 67 virtual void SetBounds(aura::Window* window, |
| 63 const gfx::Rect& bounds, | 68 const gfx::Rect& bounds, |
| 64 const gfx::Display& display) OVERRIDE { | 69 const gfx::Display& display) OVERRIDE { |
| 65 // TODO: Use the 3rd parameter, |display|. | 70 // TODO: Use the 3rd parameter, |display|. |
| 66 gfx::Point origin = bounds.origin(); | 71 gfx::Point origin = bounds.origin(); |
| 67 aura::RootWindow* root = window->GetRootWindow(); | 72 aura::RootWindow* root = window->GetRootWindow(); |
| 68 aura::Window::ConvertPointToTarget(window->parent(), root, &origin); | 73 aura::Window::ConvertPointToTarget(window->parent(), root, &origin); |
| 69 | 74 |
| 70 #if !defined(OS_WIN) | 75 #if !defined(OS_WIN) |
| 71 if (window->type() == aura::client::WINDOW_TYPE_CONTROL) { | 76 if (window->type() == aura::client::WINDOW_TYPE_CONTROL) { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 widget_->GetWidget()->Close(); | 287 widget_->GetWidget()->Close(); |
| 283 } | 288 } |
| 284 | 289 |
| 285 void DesktopNativeWidgetHelperAura::OnRootWindowMoved( | 290 void DesktopNativeWidgetHelperAura::OnRootWindowMoved( |
| 286 const aura::RootWindow* root, | 291 const aura::RootWindow* root, |
| 287 const gfx::Point& new_origin) { | 292 const gfx::Point& new_origin) { |
| 288 widget_->GetWidget()->OnNativeWidgetMove(); | 293 widget_->GetWidget()->OnNativeWidgetMove(); |
| 289 } | 294 } |
| 290 | 295 |
| 291 } // namespace views | 296 } // namespace views |
| OLD | NEW |