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

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 e46bfe267029398c2ced61e18d858d10ea89d11b..70a51d58b3729ea90bc5eae6482b46df793c1ba0 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,7 +8,7 @@
#include <memory>
#include "base/macros.h"
-#include "ui/views/bubble/bubble_delegate.h"
+#include "ui/views/bubble/bubble_dialog_delegate.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/link_listener.h"
@@ -22,10 +22,7 @@ class LabelButton;
class Link;
}
-// 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 views::LinkListener {
public:
ToolbarActionsBarBubbleViews(
@@ -35,39 +32,29 @@ 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::Label* item_list() const { return item_list_; }
- const views::LabelButton* action_button() const { return action_button_; }
- const views::LabelButton* dismiss_button() const { return dismiss_button_; }
const views::Link* learn_more_button() const { return learn_more_button_; }
private:
- // views::BubbleDelegateView:
+ // views::BubbleDialogDelegateView:
+ base::string16 GetWindowTitle() const override;
+ views::View* CreateExtraView() 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::LinkListener:
void LinkClicked(views::Link* source, int event_flags) override;
- views::View* anchor_view_;
-
std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate_;
- views::Label* heading_label_;
views::Label* content_label_;
views::Label* item_list_;
views::Link* learn_more_button_;
- 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