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

Unified Diff: ash/shelf/overflow_bubble.h

Issue 1934123004: mash: Fix shelf overflow bubble not closing on click outside its bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2openoverflow
Patch Set: rebase Created 4 years, 8 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 | « ash/pointer_watcher_delegate_aura.cc ('k') | ash/shelf/overflow_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/overflow_bubble.h
diff --git a/ash/shelf/overflow_bubble.h b/ash/shelf/overflow_bubble.h
index fc97101d62598ef4b99ac330c91cebaad96b3f24..0a9985a6b5257cfcb6d7151155790d7193f8df3f 100644
--- a/ash/shelf/overflow_bubble.h
+++ b/ash/shelf/overflow_bubble.h
@@ -5,9 +5,8 @@
#ifndef ASH_SHELF_OVERFLOW_BUBBLE_H_
#define ASH_SHELF_OVERFLOW_BUBBLE_H_
-#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "ui/events/event_handler.h"
+#include "ui/views/pointer_watcher.h"
#include "ui/views/widget/widget_observer.h"
namespace ui {
@@ -24,7 +23,7 @@ class ShelfLayoutManager;
class ShelfView;
// OverflowBubble displays the overflown launcher items in a bubble.
-class OverflowBubble : public ui::EventHandler,
+class OverflowBubble : public views::PointerWatcher,
public views::WidgetObserver {
public:
OverflowBubble();
@@ -44,11 +43,13 @@ class OverflowBubble : public ui::EventHandler,
OverflowBubbleView* bubble_view() { return bubble_; }
private:
- void ProcessPressedEvent(ui::LocatedEvent* event);
+ void ProcessPressedEvent(const gfx::Point& event_location_in_screen);
- // Overridden from ui::EventHandler:
- void OnMouseEvent(ui::MouseEvent* event) override;
- void OnTouchEvent(ui::TouchEvent* event) override;
+ // views::PointerWatcher:
+ void OnMousePressed(const ui::MouseEvent& event,
+ const gfx::Point& location_in_screen) override;
+ void OnTouchPressed(const ui::TouchEvent& event,
+ const gfx::Point& location_in_screen) override;
// Overridden from views::WidgetObserver:
void OnWidgetDestroying(views::Widget* widget) override;
« no previous file with comments | « ash/pointer_watcher_delegate_aura.cc ('k') | ash/shelf/overflow_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698