| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBB
LE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBB
LE_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBB
LE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBB
LE_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ui/views/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
| 10 #include "ui/views/controls/button/button.h" | 10 #include "ui/views/controls/button/button.h" |
| 11 | 11 |
| 12 class Profile; |
| 12 class ToolbarActionsBarBubbleDelegate; | 13 class ToolbarActionsBarBubbleDelegate; |
| 13 | 14 |
| 15 // TODO(devlin): It might be best for this to combine with |
| 16 // ExtensionMessageBubbleView, similar to what we do on Mac. |
| 14 class ExtensionToolbarIconSurfacingBubble : public views::BubbleDelegateView, | 17 class ExtensionToolbarIconSurfacingBubble : public views::BubbleDelegateView, |
| 15 public views::ButtonListener { | 18 public views::ButtonListener { |
| 16 public: | 19 public: |
| 17 ExtensionToolbarIconSurfacingBubble( | 20 ExtensionToolbarIconSurfacingBubble( |
| 18 views::View* anchor_view, | 21 views::View* anchor_view, |
| 19 ToolbarActionsBarBubbleDelegate* delegate); | 22 scoped_ptr<ToolbarActionsBarBubbleDelegate> delegate); |
| 20 ~ExtensionToolbarIconSurfacingBubble() override; | 23 ~ExtensionToolbarIconSurfacingBubble() override; |
| 21 | 24 |
| 25 void Show(); |
| 26 |
| 22 private: | 27 private: |
| 23 void Init() override; | 28 void Init() override; |
| 24 void OnWidgetDestroying(views::Widget* widget) override; | 29 void OnWidgetDestroying(views::Widget* widget) override; |
| 25 | 30 |
| 26 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 31 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 27 | 32 |
| 28 ToolbarActionsBarBubbleDelegate* delegate_; | 33 scoped_ptr<ToolbarActionsBarBubbleDelegate> delegate_; |
| 29 | 34 |
| 30 // Whether or not the user acknowledged the bubble by clicking the "ok" | 35 // Whether or not the user acknowledged the bubble by clicking the "ok" |
| 31 // button. | 36 // button. |
| 32 bool acknowledged_; | 37 bool acknowledged_; |
| 33 | 38 |
| 34 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarIconSurfacingBubble); | 39 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarIconSurfacingBubble); |
| 35 }; | 40 }; |
| 36 | 41 |
| 37 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_B
UBBLE_VIEWS_H_ | 42 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_B
UBBLE_VIEWS_H_ |
| OLD | NEW |