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

Side by Side Diff: ui/views/widget/desktop_native_widget_helper_aura.cc

Issue 10911342: Add ScreenPositionClient::ConvertNativePointToScreen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« ash/shell.cc ('K') | « ui/aura/client/screen_position_client.h ('k') | no next file » | 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/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
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
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
OLDNEW
« ash/shell.cc ('K') | « ui/aura/client/screen_position_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698