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

Side by Side 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, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
7
8 #include "components/infobars/core/confirm_infobar_delegate.h"
9 #include "ui/gfx/range/range.h"
10
11 // Base class for some of the password manager infobar delegates, e.g.
12 // SavePasswordInfoBarDelegate.
13 class PasswordManagerInfoBarDelegate : public ConfirmInfoBarDelegate {
14 public:
15 ~PasswordManagerInfoBarDelegate() override;
16
17 const gfx::Range& message_link_range() const { return message_link_range_; }
18
19 // ConfirmInfoBarDelegate:
20 Type GetInfoBarType() const override;
21 InfoBarAutomationType GetInfoBarAutomationType() const override;
22 int GetIconId() const override;
23 bool ShouldExpire(const NavigationDetails& details) const override;
24 base::string16 GetMessageText() const override;
25 bool LinkClicked(WindowOpenDisposition disposition) override;
26
27 protected:
28 PasswordManagerInfoBarDelegate();
29
30 void SetMessage(const base::string16& message);
31 void SetMessageLinkRange(const gfx::Range& message_link_range);
32
33 private:
34 // Message for the infobar: branded as a part of Google Smart Lock for signed
35 // users.
36 base::string16 message_;
37
38 // If set, describes the location of the link to the help center article for
39 // Smart Lock.
40 gfx::Range message_link_range_;
41
42 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInfoBarDelegate);
43 };
44
45 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_INFOBAR_DELEGATE_H_
OLDNEW
« 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