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

Side by Side Diff: mojo/services/window_manager/view_targeter.h

Issue 737913002: Dispatch key events to the currently focused window. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Redo FocusController storage so that it is a local property on a view. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MOJO_SERVICES_WINDOW_MANAGER_VIEW_TARGETER_H_ 5 #ifndef MOJO_SERVICES_WINDOW_MANAGER_VIEW_TARGETER_H_
6 #define MOJO_SERVICES_WINDOW_MANAGER_VIEW_TARGETER_H_ 6 #define MOJO_SERVICES_WINDOW_MANAGER_VIEW_TARGETER_H_
7 7
8 #include "ui/events/event_targeter.h" 8 #include "ui/events/event_targeter.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 10 matching lines...) Expand all
21 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root, 21 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
22 ui::Event* event) override; 22 ui::Event* event) override;
23 ui::EventTarget* FindTargetForLocatedEvent(ui::EventTarget* root, 23 ui::EventTarget* FindTargetForLocatedEvent(ui::EventTarget* root,
24 ui::LocatedEvent* event) override; 24 ui::LocatedEvent* event) override;
25 bool SubtreeCanAcceptEvent(ui::EventTarget* target, 25 bool SubtreeCanAcceptEvent(ui::EventTarget* target,
26 const ui::LocatedEvent& event) const override; 26 const ui::LocatedEvent& event) const override;
27 bool EventLocationInsideBounds(ui::EventTarget* target, 27 bool EventLocationInsideBounds(ui::EventTarget* target,
28 const ui::LocatedEvent& event) const override; 28 const ui::LocatedEvent& event) const override;
29 29
30 private: 30 private:
31 // Targets either the root View or the currently focused view.
32 ViewTarget* FindTargetForKeyEvent(ViewTarget* view, const ui::KeyEvent& key);
33
31 // Deals with cases where the |root_view| needs to change how things are 34 // Deals with cases where the |root_view| needs to change how things are
32 // dispatched. (For example, in the case of capture.) 35 // dispatched. (For example, in the case of capture.)
33 ViewTarget* FindTargetInRootView(ViewTarget* root_view, 36 ViewTarget* FindTargetInRootView(ViewTarget* root_view,
34 const ui::LocatedEvent& event); 37 const ui::LocatedEvent& event);
35 38
36 DISALLOW_COPY_AND_ASSIGN(ViewTargeter); 39 DISALLOW_COPY_AND_ASSIGN(ViewTargeter);
37 }; 40 };
38 41
39 } // namespace mojo 42 } // namespace mojo
40 43
41 #endif // MOJO_SERVICES_WINDOW_MANAGER_VIEW_TARGETER_H_ 44 #endif // MOJO_SERVICES_WINDOW_MANAGER_VIEW_TARGETER_H_
OLDNEW
« no previous file with comments | « mojo/services/window_manager/focus_controller.cc ('k') | mojo/services/window_manager/view_targeter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698