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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h

Issue 1877143002: Convert ToolbarActionsBarBubbleViews to BubbleDialogDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h
diff --git a/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h b/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h
index 39a7a5619e2cfccceeeb18a371d3cfd598f701a1..7cf70adad98f4e86b32540a9524198421fe1c87a 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h
@@ -6,8 +6,7 @@
#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_ACTIONS_BAR_BUBBLE_VIEWS_H_
#include "base/macros.h"
-#include "ui/views/bubble/bubble_delegate.h"
-#include "ui/views/controls/button/button.h"
+#include "ui/views/bubble/bubble_dialog_delegate.h"
class Profile;
class ToolbarActionsBarBubbleDelegate;
@@ -20,8 +19,7 @@ class LabelButton;
// TODO(devlin): It might be best for this to combine with
// ExtensionMessageBubbleView, similar to what we do on Mac.
-class ToolbarActionsBarBubbleViews : public views::BubbleDelegateView,
- public views::ButtonListener {
+class ToolbarActionsBarBubbleViews : public views::BubbleDialogDelegateView {
public:
ToolbarActionsBarBubbleViews(
views::View* anchor_view,
@@ -30,31 +28,17 @@ class ToolbarActionsBarBubbleViews : public views::BubbleDelegateView,
void Show();
- const views::Label* heading_label() const { return heading_label_; }
- const views::Label* content_label() const { return content_label_; }
- const views::LabelButton* action_button() const { return action_button_; }
- const views::LabelButton* dismiss_button() const { return dismiss_button_; }
-
private:
- // views::BubbleDelegateView:
+ // views::BubbleDialogDelegateView:
+ base::string16 GetWindowTitle() const override;
+ bool Cancel() override;
+ bool Accept() override;
+ int GetDialogButtons() const override;
+ base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
void Init() override;
- void OnWidgetDestroying(views::Widget* widget) override;
-
- // views::ButtonListener:
- void ButtonPressed(views::Button* sender, const ui::Event& event) override;
std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate_;
- views::Label* heading_label_;
- views::Label* content_label_;
-
- views::LabelButton* dismiss_button_;
- views::LabelButton* action_button_;
-
- // Whether or not the user acknowledged the bubble by clicking the "ok"
- // button.
- bool acknowledged_;
-
DISALLOW_COPY_AND_ASSIGN(ToolbarActionsBarBubbleViews);
};

Powered by Google App Engine
This is Rietveld 408576698