OLD | NEW |
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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 | 549 |
550 // TODO(tdanderson): GetEventHandlerForPoint() and GetEventHandlerForRect() | 550 // TODO(tdanderson): GetEventHandlerForPoint() and GetEventHandlerForRect() |
551 // will be removed once their logic is moved into | 551 // will be removed once their logic is moved into |
552 // ViewTargeter and its derived classes. See | 552 // ViewTargeter and its derived classes. See |
553 // crbug.com/355425. | 553 // crbug.com/355425. |
554 | 554 |
555 // Convenience functions which calls into GetEventHandler() with | 555 // Convenience functions which calls into GetEventHandler() with |
556 // a 1x1 rect centered at |point|. | 556 // a 1x1 rect centered at |point|. |
557 View* GetEventHandlerForPoint(const gfx::Point& point); | 557 View* GetEventHandlerForPoint(const gfx::Point& point); |
558 | 558 |
| 559 // Terry - update doc |
| 560 |
559 // If point-based targeting should be used, return the deepest visible | 561 // If point-based targeting should be used, return the deepest visible |
560 // descendant that contains the center point of |rect|. | 562 // descendant that contains the center point of |rect|. |
561 // If rect-based targeting (i.e., fuzzing) should be used, return the | 563 // If rect-based targeting (i.e., fuzzing) should be used, return the |
562 // closest visible descendant having at least kRectTargetOverlap of | 564 // closest visible descendant having at least kRectTargetOverlap of |
563 // its area covered by |rect|. If no such descendant exists, return the | 565 // its area covered by |rect|. If no such descendant exists, return the |
564 // deepest visible descendant that contains the center point of |rect|. | 566 // deepest visible descendant that contains the center point of |rect|. |
565 // See http://goo.gl/3Jp2BD for more information about rect-based targeting. | 567 // See http://goo.gl/3Jp2BD for more information about rect-based targeting. |
566 virtual View* GetEventHandlerForRect(const gfx::Rect& rect); | 568 View* GetEventHandlerForRect(const gfx::Rect& rect); |
567 | 569 |
568 // Returns the deepest visible descendant that contains the specified point | 570 // Returns the deepest visible descendant that contains the specified point |
569 // and supports tooltips. If the view does not contain the point, returns | 571 // and supports tooltips. If the view does not contain the point, returns |
570 // NULL. | 572 // NULL. |
571 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); | 573 virtual View* GetTooltipHandlerForPoint(const gfx::Point& point); |
572 | 574 |
573 // Return the cursor that should be used for this view or the default cursor. | 575 // Return the cursor that should be used for this view or the default cursor. |
574 // The event location is in the receiver's coordinate system. The caller is | 576 // The event location is in the receiver's coordinate system. The caller is |
575 // responsible for managing the lifetime of the returned object, though that | 577 // responsible for managing the lifetime of the returned object, though that |
576 // lifetime may vary from platform to platform. On Windows and Aura, | 578 // lifetime may vary from platform to platform. On Windows and Aura, |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 // Belongs to this view, but it's reference-counted on some platforms | 1589 // 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. | 1590 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1589 NativeViewAccessibility* native_view_accessibility_; | 1591 NativeViewAccessibility* native_view_accessibility_; |
1590 | 1592 |
1591 DISALLOW_COPY_AND_ASSIGN(View); | 1593 DISALLOW_COPY_AND_ASSIGN(View); |
1592 }; | 1594 }; |
1593 | 1595 |
1594 } // namespace views | 1596 } // namespace views |
1595 | 1597 |
1596 #endif // UI_VIEWS_VIEW_H_ | 1598 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |