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

Unified Diff: ash/common/system/tray/actionable_view.h

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default Created 4 years, 3 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/common/system/date/tray_date.cc ('k') | ash/common/system/tray/actionable_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/actionable_view.h
diff --git a/ash/common/system/tray/actionable_view.h b/ash/common/system/tray/actionable_view.h
index bef1bf8e16421fc34d10f8e6e6716cc40a99ec3b..82505a913928a1154fad7e0c46b163fa56d1ab58 100644
--- a/ash/common/system/tray/actionable_view.h
+++ b/ash/common/system/tray/actionable_view.h
@@ -10,6 +10,7 @@
#include "ui/views/view.h"
namespace ash {
+class SystemTrayItem;
// A focusable view that performs an action when user clicks on it, or presses
// enter or space when focused. Note that the action is triggered on mouse-up,
@@ -21,14 +22,21 @@ class ASH_EXPORT ActionableView : public views::View {
public:
static const char kViewClassName[];
- ActionableView();
+ // The owner is used to close the system tray bubble. Can be null if
+ // the action will not close the bubble.
+ explicit ActionableView(SystemTrayItem* owner);
~ActionableView() override;
void SetAccessibleName(const base::string16& name);
const base::string16& accessible_name() const { return accessible_name_; }
+ // Closes the system tray bubble. The |owner_| must not be nullptr.
+ void CloseSystemBubble();
+
protected:
+ SystemTrayItem* owner() { return owner_; }
+
void OnPaintFocus(gfx::Canvas* canvas);
// Returns the bounds to paint the focus rectangle in.
@@ -54,6 +62,8 @@ class ASH_EXPORT ActionableView : public views::View {
void OnGestureEvent(ui::GestureEvent* event) override;
private:
+ SystemTrayItem* owner_;
+
base::string16 accessible_name_;
bool has_capture_;
« no previous file with comments | « ash/common/system/date/tray_date.cc ('k') | ash/common/system/tray/actionable_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698