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

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: Fix provider to service in comments. Created 9 years, 1 month 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/intents/register_intent_handler_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 21bc4de073089e40b5da40a1b04f101a1f4c475a..473eb333b12b21dcdf4eba01bd2409904dd440a1 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;
@@ -31,6 +32,17 @@ class RegisterIntentHandlerInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual string16 GetLinkText() const OVERRIDE;
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ // Shows the intent registration infobar if |service| has not already been
+ // registered.
+ // |infobar_helper| is the infobar controller for the tab in which the infobar
+ // may be shown. Must not be NULL.
+ // |registry| is the data source for web intents. Must not be NULL.
+ // |service| is the candidate service to show the infobar for.
+ static void MaybeShowIntentInfoBar(
+ InfoBarTabHelper* infobar_helper,
+ WebIntentsRegistry* registry,
+ const webkit_glue::WebIntentServiceData& service);
+
private:
// The web intents registry to use. Weak pointer.
WebIntentsRegistry* registry_;
« no previous file with comments | « no previous file | chrome/browser/intents/register_intent_handler_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698