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

Unified Diff: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h
===================================================================
--- chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h (revision 175396)
+++ chrome/browser/custom_handlers/register_protocol_handler_infobar_delegate.h (working copy)
@@ -16,9 +16,12 @@
// card information gathered from a form submission.
class RegisterProtocolHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
- RegisterProtocolHandlerInfoBarDelegate(InfoBarService* infobar_service,
- ProtocolHandlerRegistry* registry,
- const ProtocolHandler& handler);
+ // Creates a new RPH delegate. Searches |infobar_service| for an existing
+ // delegate for the same |handler|; replaces it with the new delegate if
+ // found, otherwise adds the new infobar to |infobar_service|.
+ static void Create(InfoBarService* infobar_service,
+ ProtocolHandlerRegistry* registry,
+ const ProtocolHandler& handler);
// ConfirmInfoBarDelegate:
virtual Type GetInfoBarType() const OVERRIDE;
@@ -35,9 +38,11 @@
virtual InfoBarAutomationType GetInfoBarAutomationType() const OVERRIDE;
- bool IsReplacedBy(RegisterProtocolHandlerInfoBarDelegate* delegate);
+ private:
+ RegisterProtocolHandlerInfoBarDelegate(InfoBarService* infobar_service,
+ ProtocolHandlerRegistry* registry,
+ const ProtocolHandler& handler);
- private:
// Returns a user-friendly name for the protocol of this protocol handler.
string16 GetProtocolName(const ProtocolHandler& handler) const;
ProtocolHandlerRegistry* registry_;

Powered by Google App Engine
This is Rietveld 408576698