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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h

Issue 2907983002: Allow dialogs to use a custom View as their title. (Closed)
Patch Set: merge Created 3 years, 6 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/passwords/manage_passwords_bubble_view.h
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
index ea2c923a95338424ed2be3e74bd30a3c9b764437..d07563c909621a27878ee8932f669dced9627c71 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h
@@ -9,6 +9,7 @@
#include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
#include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h"
#include "ui/base/ui_features.h"
+#include "ui/views/controls/styled_label_listener.h"
namespace content {
class WebContents;
@@ -22,7 +23,8 @@ class WebContents;
// 2. ManageView: Displays the current page's saved credentials.
// 3. BlacklistedView: Informs the user that the current page is blacklisted.
//
-class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView {
+class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView,
+ public views::StyledLabelListener {
public:
static constexpr int kDesiredBubbleWidth = 370;
@@ -81,10 +83,17 @@ class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView {
// WidgetDelegate:
base::string16 GetWindowTitle() const override;
gfx::ImageSkia GetWindowIcon() override;
- bool ShouldShowWindowTitle() const override;
bool ShouldShowWindowIcon() const override;
bool ShouldShowCloseButton() const override;
+ // DialogDelegate:
+ views::StyledLabel* CreateTitleView() override;
+
+ // views::StyledLabelListener:
+ void StyledLabelLinkClicked(views::StyledLabel* label,
+ const gfx::Range& range,
+ int event_flags) override;
+
// Refreshes the bubble's state.
void Refresh();
« no previous file with comments | « no previous file | chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc » ('j') | ui/views/bubble/bubble_frame_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698