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

Unified Diff: ui/views/view_targeter.h

Issue 426443002: Do not call into EventTargeter methods from ViewTargeter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added DCHECK Created 6 years, 4 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
« no previous file with comments | « ui/views/view.cc ('k') | ui/views/view_targeter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_targeter.h
diff --git a/ui/views/view_targeter.h b/ui/views/view_targeter.h
index 52e7a0e0ddd077568c94cac337ac8bb55230048c..ee4e7c3dcf1c6beddfca8cfa82aeaafa6975f4a3 100644
--- a/ui/views/view_targeter.h
+++ b/ui/views/view_targeter.h
@@ -13,13 +13,8 @@ namespace views {
class View;
class ViewTargeterDelegate;
-// Contains the logic used to determine the View to which an
-// event should be dispatched. A ViewTargeter (or one of its
-// derived classes) is installed on a View to specify the
-// targeting behaviour to be used for the subtree rooted at
-// that View.
-// TODO(tdanderson): Remove overrides of all EventHandler methods except for
-// FindTargetForEvent() and FindNextBestTarget().
+// A ViewTargeter is installed on a View that wishes to use the custom
+// hit-testing or event-targeting behaviour defined by |delegate|.
class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter {
public:
explicit ViewTargeter(ViewTargeterDelegate* delegate);
@@ -32,11 +27,6 @@ class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter {
View* TargetForRect(View* root, const gfx::Rect& rect) const;
protected:
- // Returns the location of |event| represented as a rect. If |event| is
- // a gesture event, its bounding box is returned. Otherwise, a 1x1 rect
- // having its origin at the location of |event| is returned.
- gfx::RectF BoundsForEvent(const ui::LocatedEvent& event) const;
-
// ui::EventTargeter:
virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
ui::Event* event) OVERRIDE;
@@ -50,7 +40,8 @@ class VIEWS_EXPORT ViewTargeter : public ui::EventTargeter {
const ui::LocatedEvent& event) const OVERRIDE;
private:
- View* FindTargetForKeyEvent(View* view, const ui::KeyEvent& key);
+ View* FindTargetForKeyEvent(View* root, const ui::KeyEvent& key);
+ View* FindTargetForScrollEvent(View* root, const ui::ScrollEvent& scroll);
// ViewTargeter does not own the |delegate_|, but |delegate_| must
// outlive the targeter.
« no previous file with comments | « ui/views/view.cc ('k') | ui/views/view_targeter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698