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

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

Issue 10838004: Support for loading all default intent services. Necessary to allow editing of defaults from settin… (Closed) Base URL: http://git.chromium.org/chromium/src.git@newreg
Patch Set: Respond to code review comments. Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/intents/web_intents_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5b0a710818f9a18d592c88368c0aed7ee24ba5f7..404d6822f46ba67100d0d3252eeff1dabfbd35b4 100644
--- a/chrome/browser/intents/web_intents_registry.h
+++ b/chrome/browser/intents/web_intents_registry.h
@@ -24,12 +24,20 @@ class Extension;
class WebIntentsRegistry : public ProfileKeyedService {
public:
typedef std::vector<webkit_glue::WebIntentServiceData> IntentServiceList;
+ typedef std::vector<DefaultWebIntentService> DefaultIntentServiceList;
- // Callback used by WebIntentsRegistry to return results of data fetch.
+ // Callback used by callers to accept results of a query for
+ // a list of |WebIntentServiceData|.
typedef base::Callback<void(const IntentServiceList&)>
QueryCallback;
- // Callback to return results of a defaults query.
+ // Callback used by callers to accept results of a query for
+ // a list of |DefaultWebIntentService|.
+ typedef base::Callback<void(const DefaultIntentServiceList&)>
+ DefaultIntentServicesCallback;
+
+ // Callback used by callers to accept results of a query for
+ // a |DefaultWebIntentService|.
typedef base::Callback<void(const DefaultWebIntentService&)>
DefaultQueryCallback;
@@ -56,6 +64,11 @@ class WebIntentsRegistry : public ProfileKeyedService {
// |callback| must not be null.
void GetAllIntentServices(const QueryCallback& callback);
+ // Requests all default services.
+ // |callback| must not be null.
+ void GetAllDefaultIntentServices(
+ const DefaultIntentServicesCallback& callback);
+
// Tests for the existence of the given |service|. Calls the
// provided |callback| with true if it exists, false if it does not.
// Checks for |service| equality with ==.
@@ -118,6 +131,12 @@ class WebIntentsRegistry : public ProfileKeyedService {
const QueryCallback& callback,
const WDTypedResult* result);
+ // Handles default services loaded, supplying an unfiltered list
+ // to the callback.
+ void OnAllDefaultIntentServicesReceived(
+ const DefaultIntentServicesCallback& callback,
+ const WDTypedResult* result);
+
// Handles default services loaded
void OnWebIntentsDefaultsResultReceived(
const QueryParams& params,
« no previous file with comments | « no previous file | chrome/browser/intents/web_intents_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698