Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 // the not-destroyed case ButtonPressed() uses member variables. | 73 // the not-destroyed case ButtonPressed() uses member variables. |
| 74 bool* destroyed_; | 74 bool* destroyed_; |
| 75 | 75 |
| 76 SystemTrayItem* owner_; | 76 SystemTrayItem* owner_; |
| 77 | 77 |
| 78 base::string16 accessible_name_; | 78 base::string16 accessible_name_; |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(ActionableView); | 80 DISALLOW_COPY_AND_ASSIGN(ActionableView); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 // An ActionableView that can be used with a ButtonListener instead of having to | |
| 84 // extend ActionableView and override PerformAction(). | |
| 85 class ASH_EXPORT ButtonListenerActionableView : public ActionableView { | |
| 86 public: | |
| 87 ButtonListenerActionableView(SystemTrayItem* owner, | |
| 88 views::ButtonListener* listener); | |
| 89 // ~ButtonListenerActionableView() override; | |
|
tdanderson
2016/11/10 18:32:52
Uncomment? (ditto in the cc file)
bruthig
2016/11/10 18:38:47
Opted to delete completely.
| |
| 90 | |
| 91 // ActionableView: | |
| 92 bool PerformAction(const ui::Event& event) override; | |
| 93 | |
| 94 private: | |
| 95 views::ButtonListener* listener_; | |
| 96 | |
| 97 DISALLOW_COPY_AND_ASSIGN(ButtonListenerActionableView); | |
| 98 }; | |
| 99 | |
| 83 } // namespace ash | 100 } // namespace ash |
| 84 | 101 |
| 85 #endif // ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ | 102 #endif // ASH_COMMON_SYSTEM_TRAY_ACTIONABLE_VIEW_H_ |
| OLD | NEW |