OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ |
6 #define CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ | 6 #define CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 | 88 |
89 // Record the given default service entry. | 89 // Record the given default service entry. |
90 virtual void RegisterDefaultIntentService( | 90 virtual void RegisterDefaultIntentService( |
91 const DefaultWebIntentService& default_service); | 91 const DefaultWebIntentService& default_service); |
92 | 92 |
93 // Delete the given default service entry. Deletes entries matching | 93 // Delete the given default service entry. Deletes entries matching |
94 // the |action|, |type|, and |url_pattern| of |default_service|. | 94 // the |action|, |type|, and |url_pattern| of |default_service|. |
95 virtual void UnregisterDefaultIntentService( | 95 virtual void UnregisterDefaultIntentService( |
96 const DefaultWebIntentService& default_service); | 96 const DefaultWebIntentService& default_service); |
97 | 97 |
98 // Delete all default service entries associated with |service_url|. | |
99 virtual void UnregisterDefaultIntentServicesForServiceURL( | |
James Hawkins
2012/08/08 16:22:37
nit: This name is a bit unwieldy; my suggestion:
Steve McKay
2012/08/08 17:54:42
Since a default service has both a url pattern and
| |
100 const GURL& service_url); | |
101 | |
98 // Requests the best default intent service for the given invocation | 102 // Requests the best default intent service for the given invocation |
99 // parameters. | 103 // parameters. |
100 // |callback| must not be null. | 104 // |callback| must not be null. |
101 void GetDefaultIntentService(const string16& action, | 105 void GetDefaultIntentService(const string16& action, |
102 const string16& type, | 106 const string16& type, |
103 const GURL& invoking_url, | 107 const GURL& invoking_url, |
104 const DefaultQueryCallback& callback); | 108 const DefaultQueryCallback& callback); |
105 | 109 |
106 protected: | 110 protected: |
107 // Make sure that only WebIntentsRegistryFactory can create an instance of | 111 // Make sure that only WebIntentsRegistryFactory can create an instance of |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 // Shutdown/cleanup is handled by ProfileImpl. We are guaranteed that any | 172 // Shutdown/cleanup is handled by ProfileImpl. We are guaranteed that any |
169 // ProfileKeyedService will be shut down before data on ProfileImpl is | 173 // ProfileKeyedService will be shut down before data on ProfileImpl is |
170 // destroyed (i.e. |extension_service_|), so |extension_service_| is valid | 174 // destroyed (i.e. |extension_service_|), so |extension_service_| is valid |
171 // for the lifetime of the WebIntentsRegistry object. | 175 // for the lifetime of the WebIntentsRegistry object. |
172 ExtensionServiceInterface* extension_service_; | 176 ExtensionServiceInterface* extension_service_; |
173 | 177 |
174 DISALLOW_COPY_AND_ASSIGN(WebIntentsRegistry); | 178 DISALLOW_COPY_AND_ASSIGN(WebIntentsRegistry); |
175 }; | 179 }; |
176 | 180 |
177 #endif // CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ | 181 #endif // CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ |
OLD | NEW |