| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 void AddWebIntent(const WebIntentData& intent); | 344 void AddWebIntent(const WebIntentData& intent); |
| 345 | 345 |
| 346 // Removes a web intent provider registration. | 346 // Removes a web intent provider registration. |
| 347 void RemoveWebIntent(const WebIntentData& intent); | 347 void RemoveWebIntent(const WebIntentData& intent); |
| 348 | 348 |
| 349 // Get all web intent providers registered for the specified |action|. | 349 // Get all web intent providers registered for the specified |action|. |
| 350 // |consumer| must not be NULL. | 350 // |consumer| must not be NULL. |
| 351 Handle GetWebIntents(const string16& action, | 351 Handle GetWebIntents(const string16& action, |
| 352 WebDataServiceConsumer* consumer); | 352 WebDataServiceConsumer* consumer); |
| 353 | 353 |
| 354 // Get all web intent providers registered. |consumer| must not be NULL. |
| 355 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); |
| 356 |
| 354 ////////////////////////////////////////////////////////////////////////////// | 357 ////////////////////////////////////////////////////////////////////////////// |
| 355 // | 358 // |
| 356 // Token Service | 359 // Token Service |
| 357 // | 360 // |
| 358 ////////////////////////////////////////////////////////////////////////////// | 361 ////////////////////////////////////////////////////////////////////////////// |
| 359 | 362 |
| 360 // Set a token to use for a specified service. | 363 // Set a token to use for a specified service. |
| 361 void SetTokenForService(const std::string& service, | 364 void SetTokenForService(const std::string& service, |
| 362 const std::string& token); | 365 const std::string& token); |
| 363 | 366 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 void GetWebAppImagesImpl(GenericRequest<GURL>* request); | 577 void GetWebAppImagesImpl(GenericRequest<GURL>* request); |
| 575 | 578 |
| 576 ////////////////////////////////////////////////////////////////////////////// | 579 ////////////////////////////////////////////////////////////////////////////// |
| 577 // | 580 // |
| 578 // Web Intents. | 581 // Web Intents. |
| 579 // | 582 // |
| 580 ////////////////////////////////////////////////////////////////////////////// | 583 ////////////////////////////////////////////////////////////////////////////// |
| 581 void AddWebIntentImpl(GenericRequest<WebIntentData>* request); | 584 void AddWebIntentImpl(GenericRequest<WebIntentData>* request); |
| 582 void RemoveWebIntentImpl(GenericRequest<WebIntentData>* request); | 585 void RemoveWebIntentImpl(GenericRequest<WebIntentData>* request); |
| 583 void GetWebIntentsImpl(GenericRequest<string16>* request); | 586 void GetWebIntentsImpl(GenericRequest<string16>* request); |
| 587 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); |
| 584 | 588 |
| 585 ////////////////////////////////////////////////////////////////////////////// | 589 ////////////////////////////////////////////////////////////////////////////// |
| 586 // | 590 // |
| 587 // Token Service. | 591 // Token Service. |
| 588 // | 592 // |
| 589 ////////////////////////////////////////////////////////////////////////////// | 593 ////////////////////////////////////////////////////////////////////////////// |
| 590 | 594 |
| 591 void RemoveAllTokensImpl(GenericRequest<std::string>* request); | 595 void RemoveAllTokensImpl(GenericRequest<std::string>* request); |
| 592 void SetTokenForServiceImpl( | 596 void SetTokenForServiceImpl( |
| 593 GenericRequest2<std::string, std::string>* request); | 597 GenericRequest2<std::string, std::string>* request); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 // result can be NULL, if no result is expected or if the database could | 688 // result can be NULL, if no result is expected or if the database could |
| 685 // not be opened. The result object is destroyed after this call. | 689 // not be opened. The result object is destroyed after this call. |
| 686 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 690 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 687 const WDTypedResult* result) = 0; | 691 const WDTypedResult* result) = 0; |
| 688 | 692 |
| 689 protected: | 693 protected: |
| 690 virtual ~WebDataServiceConsumer() {} | 694 virtual ~WebDataServiceConsumer() {} |
| 691 }; | 695 }; |
| 692 | 696 |
| 693 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 697 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |