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

Unified Diff: ash/display/screen_position_controller.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 side-by-side diff with in-line comments
Download patch
Index: ash/display/screen_position_controller.cc
diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc
index c453c7bd5a26d3151286c944d9c9aad887c6fe73..aad39cd4ed356e38a17092c25641184c5d896145 100644
--- a/ash/display/screen_position_controller.cc
+++ b/ash/display/screen_position_controller.cc
@@ -8,6 +8,7 @@
#include "ash/root_window_controller.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
+#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/system_modal_container_layout_manager.h"
#include "ash/wm/window_properties.h"
#include "ash/wm/workspace_controller.h"
@@ -76,6 +77,15 @@ void ScreenPositionController::ConvertPointFromScreen(
aura::Window::ConvertPointToTarget(root, window, point);
}
+void ScreenPositionController::ConvertNativePointToScreen(
+ aura::Window* window,
+ gfx::Point* point) {
+ std::pair<aura::RootWindow*, gfx::Point> pair =
+ wm::GetRootWindowRelativeToWindow(window, *point);
+ *point = pair.second;
+ ConvertPointToScreen(pair.first, point);
+}
+
void ScreenPositionController::SetBounds(aura::Window* window,
const gfx::Rect& bounds,
const gfx::Display& display) {

Powered by Google App Engine
This is Rietveld 408576698