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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBBLE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBBLE_VIEWS_H_
8 #include "base/macros.h"
9 #include "ui/views/bubble/bubble_delegate.h"
10 #include "ui/views/controls/button/button.h"
13 class ToolbarActionsBarBubbleDelegate
;
15 // TODO(devlin): It might be best for this to combine with
16 // ExtensionMessageBubbleView, similar to what we do on Mac.
17 class ExtensionToolbarIconSurfacingBubble
: public views::BubbleDelegateView
,
18 public views::ButtonListener
{
20 ExtensionToolbarIconSurfacingBubble(
21 views::View
* anchor_view
,
22 scoped_ptr
<ToolbarActionsBarBubbleDelegate
> delegate
);
23 ~ExtensionToolbarIconSurfacingBubble() override
;
28 // views::BubbleDelegateView:
30 void OnWidgetDestroying(views::Widget
* widget
) override
;
32 // views::ButtonListener:
33 void ButtonPressed(views::Button
* sender
, const ui::Event
& event
) override
;
35 scoped_ptr
<ToolbarActionsBarBubbleDelegate
> delegate_
;
37 // Whether or not the user acknowledged the bubble by clicking the "ok"
41 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarIconSurfacingBubble
);
44 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBBLE_VIEWS_H_