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

Unified Diff: ash/shelf/shelf_button.cc

Issue 287193002: Remove overrides of HitTestRect() which just return false (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-upload Created 6 years, 7 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
Index: ash/shelf/shelf_button.cc
diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
index fb255d7fd893814150850f8090c2dafe248a56e1..b885c8e8adf413ea4f7d144d88afe45d68dfef3d 100644
--- a/ash/shelf/shelf_button.cc
+++ b/ash/shelf/shelf_button.cc
@@ -124,11 +124,6 @@ class ShelfButton::BarView : public views::ImageView,
}
// View
- virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE {
- // Allow Mouse...() messages to go to the parent view.
- return false;
- }
-
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
if (show_attention_) {
int alpha = ShelfButtonAnimation::GetInstance()->GetAlpha();
@@ -140,6 +135,11 @@ class ShelfButton::BarView : public views::ImageView,
}
}
+ // ui::EventTarget:
+ virtual bool CanAcceptEvent(const ui::Event& event) OVERRIDE {
+ return false;
+ }
+
// ShelfButtonAnimation::Observer
virtual void AnimationProgressed() OVERRIDE {
UpdateBounds();
@@ -201,8 +201,7 @@ 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.
sky 2014/05/21 23:03:58 Please keep these comments, they are helpful.
tdanderson 2014/05/22 19:14:19 Done.
+bool ShelfButton::IconView::CanAcceptEvent(const ui::Event& event) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698