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

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: fix test 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 51750459226b184f15737d29a43dc2a2e7156f25..6ffff8f9620a8732243beb9de96fce8e788be4af 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
@@ -8,8 +8,7 @@
#include <memory>
#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;
@@ -22,8 +21,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,
@@ -32,33 +30,18 @@ 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;
+ bool Close() 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;
-
- views::View* anchor_view_;
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