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

Unified Diff: services/window_manager/view_targeter.cc

Issue 805123003: Adds capture to the mojo window_manager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: sky comments Created 6 years 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: services/window_manager/view_targeter.cc
diff --git a/services/window_manager/view_targeter.cc b/services/window_manager/view_targeter.cc
index ab822ffd51e08936b1058dc316aad197eb4ebe78..5a2de7b644bccadf191bce867ee39fca6647bbe5 100644
--- a/services/window_manager/view_targeter.cc
+++ b/services/window_manager/view_targeter.cc
@@ -4,6 +4,7 @@
#include "services/window_manager/view_targeter.h"
+#include "services/window_manager/capture_controller.h"
#include "services/window_manager/focus_controller.h"
#include "services/window_manager/view_target.h"
@@ -85,8 +86,12 @@ ViewTarget* ViewTargeter::FindTargetInRootView(ViewTarget* root_view,
// mouse_pressed_handler() in the aura version. This is what makes sure
// that a view gets both the mouse down and up.
- // TODO(erg): We redirect to a currently active capture window here. Add this
- // when we have capture working.
+ CaptureController* capture_controller =
+ GetCaptureController(root_view->view());
+ DCHECK(capture_controller);
+ mojo::View* capture_view = capture_controller->GetCapture();
+ if (capture_view)
+ return ViewTarget::TargetFromView(capture_view);
// TODO(erg): There's a whole bunch of junk about handling touch events
// here. Handle later.
« no previous file with comments | « services/window_manager/focus_controller_unittest.cc ('k') | services/window_manager/view_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698