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

Side by Side Diff: components/infobars/core/infobar_manager.h

Issue 1540423004: Add card details and legal message to Android save credit card infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Justin's nits. Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_ 5 #ifndef COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_
6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_ 6 #define COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "components/infobars/core/infobar_delegate.h" 15 #include "components/infobars/core/infobar_delegate.h"
16 16
17 class ConfirmInfoBarDelegate; 17 class ConfirmInfoBarDelegate;
18 class GURL; 18 class GURL;
19 19
20 namespace autofill {
21 class AutofillCCInfoBarDelegate;
22 }
23
20 namespace content { 24 namespace content {
21 class WebContents; 25 class WebContents;
22 } 26 }
23 27
24 namespace infobars { 28 namespace infobars {
25 29
26 class InfoBar; 30 class InfoBar;
27 31
28 // Provides access to creating, removing and enumerating info bars 32 // Provides access to creating, removing and enumerating info bars
29 // attached to a tab. 33 // attached to a tab.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void AddObserver(Observer* obs); 101 void AddObserver(Observer* obs);
98 void RemoveObserver(Observer* obs); 102 void RemoveObserver(Observer* obs);
99 103
100 // Returns the active entry ID. 104 // Returns the active entry ID.
101 virtual int GetActiveEntryID() = 0; 105 virtual int GetActiveEntryID() = 0;
102 106
103 // Returns a confirm infobar that owns |delegate|. 107 // Returns a confirm infobar that owns |delegate|.
104 virtual scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar( 108 virtual scoped_ptr<infobars::InfoBar> CreateConfirmInfoBar(
105 scoped_ptr<ConfirmInfoBarDelegate> delegate) = 0; 109 scoped_ptr<ConfirmInfoBarDelegate> delegate) = 0;
106 110
111 // Returns an autofill credit card saving infobar that owns |delegate|.
Peter Kasting 2016/01/08 00:34:31 There has to be a better place for this. This sor
please use gerrit instead 2016/01/12 00:47:26 Created components/autofill/core/browser/autofill_
112 virtual scoped_ptr<infobars::InfoBar> CreateAutofillCCInfoBar(
113 scoped_ptr<autofill::AutofillCCInfoBarDelegate> delegate) = 0;
114
107 // Opens a URL according to the specified |disposition|. 115 // Opens a URL according to the specified |disposition|.
108 virtual void OpenURL(const GURL& url, WindowOpenDisposition disposition) = 0; 116 virtual void OpenURL(const GURL& url, WindowOpenDisposition disposition) = 0;
109 117
110 protected: 118 protected:
111 // Notifies the observer in |observer_list_|. 119 // Notifies the observer in |observer_list_|.
112 // TODO(droger): Absorb these methods back into their callers once virtual 120 // TODO(droger): Absorb these methods back into their callers once virtual
113 // overrides are removed (see http://crbug.com/354380). 121 // overrides are removed (see http://crbug.com/354380).
114 virtual void NotifyInfoBarAdded(InfoBar* infobar); 122 virtual void NotifyInfoBarAdded(InfoBar* infobar);
115 virtual void NotifyInfoBarRemoved(InfoBar* infobar, bool animate); 123 virtual void NotifyInfoBarRemoved(InfoBar* infobar, bool animate);
116 124
(...skipping 11 matching lines...) Expand all
128 bool infobars_enabled_; 136 bool infobars_enabled_;
129 137
130 base::ObserverList<Observer, true> observer_list_; 138 base::ObserverList<Observer, true> observer_list_;
131 139
132 DISALLOW_COPY_AND_ASSIGN(InfoBarManager); 140 DISALLOW_COPY_AND_ASSIGN(InfoBarManager);
133 }; 141 };
134 142
135 } // namespace infobars 143 } // namespace infobars
136 144
137 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_ 145 #endif // COMPONENTS_INFOBARS_CORE_INFOBAR_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698