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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void GetDefaultIntentService(const string16& action, | 108 void GetDefaultIntentService(const string16& action, |
109 const string16& type, | 109 const string16& type, |
110 const GURL& invoking_url, | 110 const GURL& invoking_url, |
111 const DefaultQueryCallback& callback); | 111 const DefaultQueryCallback& callback); |
112 | 112 |
113 protected: | 113 protected: |
114 // Make sure that only WebIntentsRegistryFactory can create an instance of | 114 // Make sure that only WebIntentsRegistryFactory can create an instance of |
115 // WebIntentsRegistry. | 115 // WebIntentsRegistry. |
116 friend class WebIntentsRegistryFactory; | 116 friend class WebIntentsRegistryFactory; |
117 friend class WebIntentsRegistryTest; | 117 friend class WebIntentsRegistryTest; |
118 friend class WebIntentsModelTest; | |
119 FRIEND_TEST_ALL_PREFIXES(WebIntentsRegistryTest, CollapseIntents); | 118 FRIEND_TEST_ALL_PREFIXES(WebIntentsRegistryTest, CollapseIntents); |
120 | 119 |
121 WebIntentsRegistry(); | 120 WebIntentsRegistry(); |
122 virtual ~WebIntentsRegistry(); | 121 virtual ~WebIntentsRegistry(); |
123 | 122 |
124 // Collapses a list of IntentServices by joining intents that have identical | 123 // Collapses a list of IntentServices by joining intents that have identical |
125 // service URLs, actions, and mime types. | 124 // service URLs, actions, and mime types. |
126 // |services| is the list of intent services to be collapsed when passed in | 125 // |services| is the list of intent services to be collapsed when passed in |
127 // and will be modified with the new list in-place. | 126 // and will be modified with the new list in-place. |
128 void CollapseIntents(IntentServiceList* services); | 127 void CollapseIntents(IntentServiceList* services); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // for the lifetime of the WebIntentsRegistry object. | 171 // for the lifetime of the WebIntentsRegistry object. |
173 ExtensionServiceInterface* extension_service_; | 172 ExtensionServiceInterface* extension_service_; |
174 | 173 |
175 // Registry used to obtain list of supported native services. | 174 // Registry used to obtain list of supported native services. |
176 scoped_ptr<web_intents::NativeServiceRegistry> native_services_; | 175 scoped_ptr<web_intents::NativeServiceRegistry> native_services_; |
177 | 176 |
178 DISALLOW_COPY_AND_ASSIGN(WebIntentsRegistry); | 177 DISALLOW_COPY_AND_ASSIGN(WebIntentsRegistry); |
179 }; | 178 }; |
180 | 179 |
181 #endif // CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ | 180 #endif // CHROME_BROWSER_INTENTS_WEB_INTENTS_REGISTRY_H_ |
OLD | NEW |