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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1881253002: mus: Implement ScreenMus::GetCursorScreenPoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test mocks too Created 4 years, 8 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: components/mus/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 9b199da20cc8d1fb99f9ed7d151ce3152a046265..989b23fd7d4611e2378383be02e22a21c69198cf 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
+#include "base/threading/thread_restrictions.h"
#include "components/mus/common/util.h"
#include "components/mus/public/cpp/input_event_handler.h"
#include "components/mus/public/cpp/lib/in_flight_change.h"
@@ -814,6 +815,13 @@ Window* WindowTreeClientImpl::GetCaptureWindow() {
return capture_window_;
}
+gfx::Point WindowTreeClientImpl::GetCursorScreenPoint() {
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
sky 2016/04/18 15:09:11 Add a TODO that this code should use the location
+ mojo::PointPtr p;
+ tree_ptr_->GetCursorScreenPoint(&p);
+ return p.To<gfx::Point>();
+}
+
void WindowTreeClientImpl::OnWindowVisibilityChanged(Id window_id,
bool visible) {
Window* window = GetWindowByServerId(window_id);

Powered by Google App Engine
This is Rietveld 408576698