| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 void AddWebIntent(const WebIntentServiceData& service); | 361 void AddWebIntent(const WebIntentServiceData& service); |
| 362 | 362 |
| 363 // Removes a web intent provider registration. | 363 // Removes a web intent provider registration. |
| 364 void RemoveWebIntent(const WebIntentServiceData& service); | 364 void RemoveWebIntent(const WebIntentServiceData& service); |
| 365 | 365 |
| 366 // Get all web intent providers registered for the specified |action|. | 366 // Get all web intent providers registered for the specified |action|. |
| 367 // |consumer| must not be NULL. | 367 // |consumer| must not be NULL. |
| 368 Handle GetWebIntents(const string16& action, | 368 Handle GetWebIntents(const string16& action, |
| 369 WebDataServiceConsumer* consumer); | 369 WebDataServiceConsumer* consumer); |
| 370 | 370 |
| 371 // Get all web intent providers registered for the specified |action| |
| 372 // and using the specified |service_url|. |
| 373 Handle GetWebIntentsForURL(const string16& action, |
| 374 const string16& service_url, |
| 375 WebDataServiceConsumer* consumer); |
| 376 |
| 371 // Get all web intent providers registered. |consumer| must not be NULL. | 377 // Get all web intent providers registered. |consumer| must not be NULL. |
| 372 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); | 378 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); |
| 373 | 379 |
| 374 ////////////////////////////////////////////////////////////////////////////// | 380 ////////////////////////////////////////////////////////////////////////////// |
| 375 // | 381 // |
| 376 // Token Service | 382 // Token Service |
| 377 // | 383 // |
| 378 ////////////////////////////////////////////////////////////////////////////// | 384 ////////////////////////////////////////////////////////////////////////////// |
| 379 | 385 |
| 380 // Set a token to use for a specified service. | 386 // Set a token to use for a specified service. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 void GetWebAppImagesImpl(GenericRequest<GURL>* request); | 600 void GetWebAppImagesImpl(GenericRequest<GURL>* request); |
| 595 | 601 |
| 596 ////////////////////////////////////////////////////////////////////////////// | 602 ////////////////////////////////////////////////////////////////////////////// |
| 597 // | 603 // |
| 598 // Web Intents. | 604 // Web Intents. |
| 599 // | 605 // |
| 600 ////////////////////////////////////////////////////////////////////////////// | 606 ////////////////////////////////////////////////////////////////////////////// |
| 601 void AddWebIntentImpl(GenericRequest<WebIntentServiceData>* request); | 607 void AddWebIntentImpl(GenericRequest<WebIntentServiceData>* request); |
| 602 void RemoveWebIntentImpl(GenericRequest<WebIntentServiceData>* request); | 608 void RemoveWebIntentImpl(GenericRequest<WebIntentServiceData>* request); |
| 603 void GetWebIntentsImpl(GenericRequest<string16>* request); | 609 void GetWebIntentsImpl(GenericRequest<string16>* request); |
| 610 void GetWebIntentsForURLImpl(GenericRequest2<string16, string16>* request); |
| 604 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); | 611 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); |
| 605 | 612 |
| 606 ////////////////////////////////////////////////////////////////////////////// | 613 ////////////////////////////////////////////////////////////////////////////// |
| 607 // | 614 // |
| 608 // Token Service. | 615 // Token Service. |
| 609 // | 616 // |
| 610 ////////////////////////////////////////////////////////////////////////////// | 617 ////////////////////////////////////////////////////////////////////////////// |
| 611 | 618 |
| 612 void RemoveAllTokensImpl(GenericRequest<std::string>* request); | 619 void RemoveAllTokensImpl(GenericRequest<std::string>* request); |
| 613 void SetTokenForServiceImpl( | 620 void SetTokenForServiceImpl( |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 // result can be NULL, if no result is expected or if the database could | 712 // result can be NULL, if no result is expected or if the database could |
| 706 // not be opened. The result object is destroyed after this call. | 713 // not be opened. The result object is destroyed after this call. |
| 707 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 714 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 708 const WDTypedResult* result) = 0; | 715 const WDTypedResult* result) = 0; |
| 709 | 716 |
| 710 protected: | 717 protected: |
| 711 virtual ~WebDataServiceConsumer() {} | 718 virtual ~WebDataServiceConsumer() {} |
| 712 }; | 719 }; |
| 713 | 720 |
| 714 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 721 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |