summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authortdanderson@chromium.org <tdanderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-02 23:22:45 +0000
committertdanderson@chromium.org <tdanderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-02 23:22:45 +0000
commit8413aadee300359e05e1592e75364e40dcc21b6a (patch)
treeed01117ecd3273e3e69f42399625a2200e427a37 /ash
parent674b6567e2fa738e2db2e5174d3ff8ff96740c7b (diff)
downloadchromium_src-8413aadee300359e05e1592e75364e40dcc21b6a.zip
chromium_src-8413aadee300359e05e1592e75364e40dcc21b6a.tar.gz
chromium_src-8413aadee300359e05e1592e75364e40dcc21b6a.tar.bz2
Remove overrides of HitTestRect() which just return false
Some overrides of View::HitTestRect() just return false in order to force event-targeting to fail for that view type and its descendants. Because this logic is unrelated to hit-testing against a rectangular region, remove these overrides and instead override View::CanProcessEventsWithinSubtree() to just return false. The relevant classes are: ProfileImageView ShelfButton::BarView ShelfButton::IconView PasswordRow BoundedLabel Label (and Link as a result) BUG=374303 TEST=none Review URL: https://codereview.chromium.org/287193002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/shelf/shelf_button.cc10
-rw-r--r--ash/shelf/shelf_button.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
index fb255d7..e1db5d0 100644
--- a/ash/shelf/shelf_button.cc
+++ b/ash/shelf/shelf_button.cc
@@ -123,9 +123,9 @@ class ShelfButton::BarView : public views::ImageView,
ShelfButtonAnimation::GetInstance()->RemoveObserver(this);
}
- // View
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE {
- // Allow Mouse...() messages to go to the parent view.
+ // views::View:
+ virtual bool CanProcessEventsWithinSubtree() const OVERRIDE {
+ // Send events to the parent view for handling.
return false;
}
@@ -201,8 +201,8 @@ ShelfButton::IconView::IconView() : icon_size_(kIconSize) {
ShelfButton::IconView::~IconView() {
}
-bool ShelfButton::IconView::HitTestRect(const gfx::Rect& rect) const {
- // Return false so that ShelfButton gets all the mouse events.
+bool ShelfButton::IconView::CanProcessEventsWithinSubtree() const {
+ // Return false so that events are sent to ShelfView for handling.
return false;
}
diff --git a/ash/shelf/shelf_button.h b/ash/shelf/shelf_button.h
index 96fab24..afe0e70 100644
--- a/ash/shelf/shelf_button.h
+++ b/ash/shelf/shelf_button.h
@@ -82,8 +82,8 @@ class ASH_EXPORT ShelfButton : public views::CustomButton {
void set_icon_size(int icon_size) { icon_size_ = icon_size; }
int icon_size() const { return icon_size_; }
- // views::View overrides.
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
+ // views::View:
+ virtual bool CanProcessEventsWithinSubtree() const OVERRIDE;
private:
// Set to non-zero to force icons to be resized to fit within a square,