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

Unified Diff: chrome/browser/password_manager/password_manager_infobar_delegate.h

Issue 1313363004: [Password Manager] Extract some methods of SavePasswordInfobarDelegate to separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_manager_infobar_delegate.h
diff --git a/chrome/browser/password_manager/password_manager_infobar_delegate.h b/chrome/browser/password_manager/password_manager_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c4748faa5ed3fdb168d2f1935fc429a68be5a22
--- /dev/null
+++ b/chrome/browser/password_manager/password_manager_infobar_delegate.h
@@ -0,0 +1,45 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
+
+#include "components/infobars/core/confirm_infobar_delegate.h"
+#include "ui/gfx/range/range.h"
+
+// Base class for some of the password manager infobar delegates, e.g.
+// SavePasswordInfoBarDelegate.
+class PasswordManagerInfoBarDelegate : public ConfirmInfoBarDelegate {
+ public:
+ ~PasswordManagerInfoBarDelegate() override;
+
+ const gfx::Range& message_link_range() const { return message_link_range_; }
+
+ // ConfirmInfoBarDelegate:
+ Type GetInfoBarType() const override;
+ InfoBarAutomationType GetInfoBarAutomationType() const override;
+ int GetIconId() const override;
+ bool ShouldExpire(const NavigationDetails& details) const override;
+ base::string16 GetMessageText() const override;
+ bool LinkClicked(WindowOpenDisposition disposition) override;
+
+ protected:
+ PasswordManagerInfoBarDelegate();
+
+ void SetMessage(const base::string16& message);
+ void SetMessageLinkRange(const gfx::Range& message_link_range);
+
+ private:
+ // Message for the infobar: branded as a part of Google Smart Lock for signed
+ // users.
+ base::string16 message_;
+
+ // If set, describes the location of the link to the help center article for
+ // Smart Lock.
+ gfx::Range message_link_range_;
+
+ DISALLOW_COPY_AND_ASSIGN(PasswordManagerInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_manager_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698