| 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_WEBDATA_WEB_DATA_SERVICE_H__ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 6 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // |consumer| must not be NULL. | 388 // |consumer| must not be NULL. |
| 389 Handle GetWebIntentServicesForURL(const string16& service_url, | 389 Handle GetWebIntentServicesForURL(const string16& service_url, |
| 390 WebDataServiceConsumer* consumer); | 390 WebDataServiceConsumer* consumer); |
| 391 | 391 |
| 392 // Get all web intent services registered. |consumer| must not be NULL. | 392 // Get all web intent services registered. |consumer| must not be NULL. |
| 393 Handle GetAllWebIntentServices(WebDataServiceConsumer* consumer); | 393 Handle GetAllWebIntentServices(WebDataServiceConsumer* consumer); |
| 394 | 394 |
| 395 // Adds a default web intent service entry. | 395 // Adds a default web intent service entry. |
| 396 void AddDefaultWebIntentService(const DefaultWebIntentService& service); | 396 void AddDefaultWebIntentService(const DefaultWebIntentService& service); |
| 397 | 397 |
| 398 // Adds a default web intent service entry. | 398 // Removes a default web intent service entry. Removes entries matching |
| 399 // the |action|, |type|, and |url_pattern| of |service|. |
| 399 void RemoveDefaultWebIntentService(const DefaultWebIntentService& service); | 400 void RemoveDefaultWebIntentService(const DefaultWebIntentService& service); |
| 400 | 401 |
| 401 // Get a list of all web intent service defaults for the given |action|. | 402 // Get a list of all web intent service defaults for the given |action|. |
| 402 // |consumer| must not be null. | 403 // |consumer| must not be null. |
| 403 Handle GetDefaultWebIntentServicesForAction(const string16& action, | 404 Handle GetDefaultWebIntentServicesForAction(const string16& action, |
| 404 WebDataServiceConsumer* consumer); | 405 WebDataServiceConsumer* consumer); |
| 405 | 406 |
| 406 // Get a list of all registered web intent service defaults. | 407 // Get a list of all registered web intent service defaults. |
| 407 // |consumer| must not be null. | 408 // |consumer| must not be null. |
| 408 Handle GetAllDefaultWebIntentServices(WebDataServiceConsumer* consumer); | 409 Handle GetAllDefaultWebIntentServices(WebDataServiceConsumer* consumer); |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 // result can be NULL, if no result is expected or if the database could | 780 // result can be NULL, if no result is expected or if the database could |
| 780 // not be opened. The result object is destroyed after this call. | 781 // not be opened. The result object is destroyed after this call. |
| 781 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 782 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 782 const WDTypedResult* result) = 0; | 783 const WDTypedResult* result) = 0; |
| 783 | 784 |
| 784 protected: | 785 protected: |
| 785 virtual ~WebDataServiceConsumer() {} | 786 virtual ~WebDataServiceConsumer() {} |
| 786 }; | 787 }; |
| 787 | 788 |
| 788 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 789 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |