Chromium Code Reviews| 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 962f5debaf435708853d6862cadc7dffd760550e..8cf182576dbb7402721132979dfbf12645142df5 100644 | 
| --- a/chrome/browser/intents/web_intents_registry.h | 
| +++ b/chrome/browser/intents/web_intents_registry.h | 
| @@ -14,6 +14,8 @@ | 
| #include "chrome/browser/webdata/web_data_service.h" | 
| #include "webkit/glue/web_intent_service_data.h" | 
| +struct DefaultWebIntentService; | 
| + | 
| // Handles storing and retrieving of web intents services in the web database. | 
| // The registry provides filtering logic to retrieve specific types of services. | 
| class WebIntentsRegistry | 
| @@ -35,6 +37,13 @@ class WebIntentsRegistry | 
| QueryID query_id, | 
| const IntentServiceList& services) = 0; | 
| + // Notifies the observer that a request for intents default service | 
| + // has been completed. If no default is found, the |default_service| | 
| + // service_url field will be empty. | 
| + virtual void OnIntentsDefaultsQueryDone( | 
| + QueryID query_id, | 
| + const DefaultWebIntentService& default_service) = 0; | 
| 
 
groby-ooo-7-16
2012/02/22 01:40:18
Should this be a callback instead?
 
Greg Billock
2012/02/23 23:39:00
Yeah, I wanted to talk to you about this. Shall I
 
groby-ooo-7-16
2012/02/27 18:23:29
Probably a separate refactor, so we can land this
 
 | 
| + | 
| protected: | 
| virtual ~Consumer() {} | 
| }; | 
| @@ -68,6 +77,22 @@ class WebIntentsRegistry | 
| const webkit_glue::WebIntentServiceData& service, | 
| const base::Callback<void(bool)>& callback); | 
| + // Record the given default service entry. | 
| + virtual void RegisterDefaultIntentService( | 
| + const DefaultWebIntentService& default_service); | 
| + | 
| + // Delete the given default service entry. Deletes entries matching | 
| + // the |action|, |type|, and |url_pattern| of |default_service|. | 
| + virtual void UnregisterDefaultIntentService( | 
| + const DefaultWebIntentService& default_service); | 
| + | 
| + // Requests the best default intent service for the given invocation | 
| + // parameters. | 
| + QueryID GetDefaultIntentService(const string16& action, | 
| + const string16& type, | 
| + const GURL& invoking_url, | 
| + Consumer* consumer); | 
| + | 
| protected: | 
| // Make sure that only WebIntentsRegistryFactory can create an instance of | 
| // WebIntentsRegistry. | 
| @@ -90,6 +115,11 @@ class WebIntentsRegistry | 
| WebDataService::Handle h, | 
| const WDTypedResult* result) OVERRIDE; | 
| + // Delegate for defaults requests. | 
| + virtual void OnWebDataServiceDefaultsRequestDone( | 
| 
 
groby-ooo-7-16
2012/02/22 01:40:18
This looks like its part of WebDataServiceConsumer
 
Greg Billock
2012/02/23 23:39:00
Oops. It shouldn't OVERRIDE. Marking it as a deleg
 
 | 
| + WebDataService::Handle h, | 
| + const WDTypedResult* result) OVERRIDE; | 
| + | 
| // Map for all in-flight web data requests/intent queries. | 
| QueryMap queries_; |