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

Unified Diff: mojo/services/window_manager/view_target.h

Issue 737913002: Dispatch key events to the currently focused window. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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: mojo/services/window_manager/view_target.h
diff --git a/mojo/services/window_manager/view_target.h b/mojo/services/window_manager/view_target.h
index ec20eb7877b96c7e51a3eded6cfef5905460e1ed..f77bfbbd14fd1757e14bbebbe7bfdd15db48e5a0 100644
--- a/mojo/services/window_manager/view_target.h
+++ b/mojo/services/window_manager/view_target.h
@@ -19,6 +19,7 @@ class EventTargeter;
namespace mojo {
+class FocusController;
class TestView;
class View;
class ViewTargeter;
@@ -47,6 +48,11 @@ class ViewTarget : public ui::EventTarget {
View* view() { return view_; }
+ FocusController* focus_controller() { return focus_controller_; }
+ void set_focus_controller(FocusController* focus_controller) {
sky 2014/11/18 22:36:38 Document ownership.
Elliot Glaysher 2014/11/18 23:52:30 Was unhappy with this. Instead of hanging it here,
+ focus_controller_ = focus_controller;
+ }
+
// TODO(erg): Make this const once we've removed aura from the tree and it's
// feasible to change all callers of the EventTargeter interface to pass and
// accept const objects. (When that gets done, re-const the
@@ -87,6 +93,8 @@ class ViewTarget : public ui::EventTarget {
// The mojo::View that we dispatch to.
View* view_;
+ FocusController* focus_controller_;
+
scoped_ptr<ViewTargeter> targeter_;
DISALLOW_COPY_AND_ASSIGN(ViewTarget);

Powered by Google App Engine
This is Rietveld 408576698