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

Unified Diff: chrome/browser/intents/web_intents_registry.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: More updates 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/web_intents_registry.h
diff --git a/chrome/browser/intents/web_intents_registry.h b/chrome/browser/intents/web_intents_registry.h
index 7a712a314b384af4c078f26a4af8b6d3f9b293d8..5adadb5a0c1dc44d12f0c33e814ea11f090721f3 100644
--- a/chrome/browser/intents/web_intents_registry.h
+++ b/chrome/browser/intents/web_intents_registry.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_
#pragma once
+#include "base/callback.h"
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -42,10 +43,10 @@ class WebIntentsRegistry
ExtensionServiceInterface* extension_service);
// Registers a web intent provider.
- virtual void RegisterIntentProvider(const WebIntentServiceData& intent);
+ virtual void RegisterIntentProvider(const WebIntentServiceData& provider);
// Removes a web intent provider from the registry.
- void UnregisterIntentProvider(const WebIntentServiceData& intent);
+ void UnregisterIntentProvider(const WebIntentServiceData& provider);
// Requests all intent providers matching |action|.
// |consumer| must not be NULL.
@@ -54,6 +55,12 @@ class WebIntentsRegistry
// Requests all intent providers. |consumer| must not be NULL
QueryID GetAllIntentProviders(Consumer* consumer);
+ // Tests for the existence of the given intent |provider|. Calls the
+ // provided |callback| with true if it exists, false if it does not.
+ // Checks for |provider| equality with ==.
+ QueryID IntentProviderExists(const WebIntentServiceData& provider,
+ const base::Callback<void(bool)>& callback);
+
protected:
// Make sure that only WebIntentsRegistryFactory can create an instance of
// WebIntentsRegistry.

Powered by Google App Engine
This is Rietveld 408576698