Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / views / extensions / extension_toolbar_icon_surfacing_bubble_views.h
blob1dbb66374805e70616c3d082fdb17a5f19884967
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"
12 class Profile;
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 {
19 public:
20 ExtensionToolbarIconSurfacingBubble(
21 views::View* anchor_view,
22 scoped_ptr<ToolbarActionsBarBubbleDelegate> delegate);
23 ~ExtensionToolbarIconSurfacingBubble() override;
25 void Show();
27 private:
28 // views::BubbleDelegateView:
29 void Init() override;
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"
38 // button.
39 bool acknowledged_;
41 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarIconSurfacingBubble);
44 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_TOOLBAR_ICON_SURFACING_BUBBLE_VIEWS_H_