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

Unified Diff: chrome/browser/intents/register_intent_handler_infobar_delegate.h

Issue 8144013: Add a check to the registry before the intent infobar is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add doc Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/intents/register_intent_handler_infobar_delegate.h
diff --git a/chrome/browser/intents/register_intent_handler_infobar_delegate.h b/chrome/browser/intents/register_intent_handler_infobar_delegate.h
index 83ae2fa75956d7e52a58bbd96740db7b0a8a7c24..093c89d771fc6efb0c95df102e59d4bcfd05a267 100644
--- a/chrome/browser/intents/register_intent_handler_infobar_delegate.h
+++ b/chrome/browser/intents/register_intent_handler_infobar_delegate.h
@@ -11,6 +11,7 @@
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "webkit/glue/web_intent_service_data.h"
+class InfoBarTabHelper;
class TabContents;
class WebIntentsRegistry;
@@ -30,6 +31,17 @@ class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual string16 GetLinkText() const OVERRIDE;
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ // This helper method checks the registry to see if the indicated service has
+ // already been registered. If all registration details are the same, it does
+ // not show the infobar.
+ // |infobar_helper| is the infobar controller for the tab in which to maybe
James Hawkins 2011/10/05 22:27:17 in which the infobar may be shown. Sounds a bit c
Greg Billock 2011/10/05 22:45:53 Done.
+ // show the infobar.
+ // |registry| is the data source for web intents.
+ // |service| is the candidate service to show the infobar for.
+ static void MaybeShowIntentInfoBar(InfoBarTabHelper* infobar_helper,
+ WebIntentsRegistry* registry,
+ const WebIntentServiceData& service);
+
private:
// The web intents registry to use. Weak pointer.
WebIntentsRegistry* registry_;

Powered by Google App Engine
This is Rietveld 408576698