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

Side by Side Diff: ui/views/view.h

Issue 395223002: Remove some TODOs related to event targeting in views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/view_targeter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // because their drawing logic stays the same and they can become agnostic to 540 // because their drawing logic stays the same and they can become agnostic to
541 // the UI directionality. 541 // the UI directionality.
542 void EnableCanvasFlippingForRTLUI(bool enable) { 542 void EnableCanvasFlippingForRTLUI(bool enable) {
543 flip_canvas_on_paint_for_rtl_ui_ = enable; 543 flip_canvas_on_paint_for_rtl_ui_ = enable;
544 } 544 }
545 545
546 // Input --------------------------------------------------------------------- 546 // Input ---------------------------------------------------------------------
547 // The points, rects, mouse locations, and touch locations in the following 547 // The points, rects, mouse locations, and touch locations in the following
548 // functions are in the view's coordinates, except for a RootView. 548 // functions are in the view's coordinates, except for a RootView.
549 549
550 // TODO(tdanderson): GetEventHandlerForPoint() and GetEventHandlerForRect()
551 // will be removed once their logic is moved into
552 // ViewTargeter and its derived classes. See
553 // crbug.com/355425.
554
555 // Convenience functions which calls into GetEventHandler() with 550 // Convenience functions which calls into GetEventHandler() with
556 // a 1x1 rect centered at |point|. 551 // a 1x1 rect centered at |point|.
557 View* GetEventHandlerForPoint(const gfx::Point& point); 552 View* GetEventHandlerForPoint(const gfx::Point& point);
558 553
559 // If point-based targeting should be used, return the deepest visible 554 // If point-based targeting should be used, return the deepest visible
560 // descendant that contains the center point of |rect|. 555 // descendant that contains the center point of |rect|.
561 // If rect-based targeting (i.e., fuzzing) should be used, return the 556 // If rect-based targeting (i.e., fuzzing) should be used, return the
562 // closest visible descendant having at least kRectTargetOverlap of 557 // closest visible descendant having at least kRectTargetOverlap of
563 // its area covered by |rect|. If no such descendant exists, return the 558 // its area covered by |rect|. If no such descendant exists, return the
564 // deepest visible descendant that contains the center point of |rect|. 559 // deepest visible descendant that contains the center point of |rect|.
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 // Belongs to this view, but it's reference-counted on some platforms 1582 // Belongs to this view, but it's reference-counted on some platforms
1588 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1583 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1589 NativeViewAccessibility* native_view_accessibility_; 1584 NativeViewAccessibility* native_view_accessibility_;
1590 1585
1591 DISALLOW_COPY_AND_ASSIGN(View); 1586 DISALLOW_COPY_AND_ASSIGN(View);
1592 }; 1587 };
1593 1588
1594 } // namespace views 1589 } // namespace views
1595 1590
1596 #endif // UI_VIEWS_VIEW_H_ 1591 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/view_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698