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 // Chromium settings and storage represent user-selected preferences and | 5 // Chromium settings and storage represent user-selected preferences and |
6 // information and MUST not be extracted, overwritten or modified except | 6 // information and MUST not be extracted, overwritten or modified except |
7 // through Chromium defined APIs. | 7 // through Chromium defined APIs. |
8 | 8 |
9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 9 #ifndef CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 10 #define CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 // Get all web intent services registered. |consumer| must not be NULL. | 394 // Get all web intent services registered. |consumer| must not be NULL. |
395 Handle GetAllWebIntentServices(WebDataServiceConsumer* consumer); | 395 Handle GetAllWebIntentServices(WebDataServiceConsumer* consumer); |
396 | 396 |
397 // Adds a default web intent service entry. | 397 // Adds a default web intent service entry. |
398 void AddDefaultWebIntentService(const DefaultWebIntentService& service); | 398 void AddDefaultWebIntentService(const DefaultWebIntentService& service); |
399 | 399 |
400 // Removes a default web intent service entry. Removes entries matching | 400 // Removes a default web intent service entry. Removes entries matching |
401 // the |action|, |type|, and |url_pattern| of |service|. | 401 // the |action|, |type|, and |url_pattern| of |service|. |
402 void RemoveDefaultWebIntentService(const DefaultWebIntentService& service); | 402 void RemoveDefaultWebIntentService(const DefaultWebIntentService& service); |
403 | 403 |
404 // Get a list of all web intent service defaults for the given |action|. | 404 // Removes all default web intent service entries associated with |
| 405 // |service_url| |
| 406 void RemoveWebIntentServiceDefaults(const GURL& service_url); |
| 407 |
| 408 // Get a list of all web intent service defaults for the given |action|. |
405 // |consumer| must not be null. | 409 // |consumer| must not be null. |
406 Handle GetDefaultWebIntentServicesForAction(const string16& action, | 410 Handle GetDefaultWebIntentServicesForAction(const string16& action, |
407 WebDataServiceConsumer* consumer); | 411 WebDataServiceConsumer* consumer); |
408 | 412 |
409 // Get a list of all registered web intent service defaults. | 413 // Get a list of all registered web intent service defaults. |
410 // |consumer| must not be null. | 414 // |consumer| must not be null. |
411 Handle GetAllDefaultWebIntentServices(WebDataServiceConsumer* consumer); | 415 Handle GetAllDefaultWebIntentServices(WebDataServiceConsumer* consumer); |
412 | 416 |
413 | |
414 ////////////////////////////////////////////////////////////////////////////// | 417 ////////////////////////////////////////////////////////////////////////////// |
415 // | 418 // |
416 // Token Service | 419 // Token Service |
417 // | 420 // |
418 ////////////////////////////////////////////////////////////////////////////// | 421 ////////////////////////////////////////////////////////////////////////////// |
419 | 422 |
420 // Set a token to use for a specified service. | 423 // Set a token to use for a specified service. |
421 void SetTokenForService(const std::string& service, | 424 void SetTokenForService(const std::string& service, |
422 const std::string& token); | 425 const std::string& token); |
423 | 426 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 GenericRequest<webkit_glue::WebIntentServiceData>* request); | 625 GenericRequest<webkit_glue::WebIntentServiceData>* request); |
623 void RemoveWebIntentServiceImpl( | 626 void RemoveWebIntentServiceImpl( |
624 GenericRequest<webkit_glue::WebIntentServiceData>* request); | 627 GenericRequest<webkit_glue::WebIntentServiceData>* request); |
625 void GetWebIntentServicesImpl(GenericRequest<string16>* request); | 628 void GetWebIntentServicesImpl(GenericRequest<string16>* request); |
626 void GetWebIntentServicesForURLImpl(GenericRequest<string16>* request); | 629 void GetWebIntentServicesForURLImpl(GenericRequest<string16>* request); |
627 void GetAllWebIntentServicesImpl(GenericRequest<std::string>* request); | 630 void GetAllWebIntentServicesImpl(GenericRequest<std::string>* request); |
628 void AddDefaultWebIntentServiceImpl( | 631 void AddDefaultWebIntentServiceImpl( |
629 GenericRequest<DefaultWebIntentService>* request); | 632 GenericRequest<DefaultWebIntentService>* request); |
630 void RemoveDefaultWebIntentServiceImpl( | 633 void RemoveDefaultWebIntentServiceImpl( |
631 GenericRequest<DefaultWebIntentService>* request); | 634 GenericRequest<DefaultWebIntentService>* request); |
| 635 void RemoveWebIntentServiceDefaultsImpl(GenericRequest<GURL>* request); |
632 void GetDefaultWebIntentServicesForActionImpl( | 636 void GetDefaultWebIntentServicesForActionImpl( |
633 GenericRequest<string16>* request); | 637 GenericRequest<string16>* request); |
634 void GetAllDefaultWebIntentServicesImpl(GenericRequest<std::string>* request); | 638 void GetAllDefaultWebIntentServicesImpl(GenericRequest<std::string>* request); |
635 | 639 |
636 ////////////////////////////////////////////////////////////////////////////// | 640 ////////////////////////////////////////////////////////////////////////////// |
637 // | 641 // |
638 // Token Service. | 642 // Token Service. |
639 // | 643 // |
640 ////////////////////////////////////////////////////////////////////////////// | 644 ////////////////////////////////////////////////////////////////////////////// |
641 | 645 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 // result can be NULL, if no result is expected or if the database could | 741 // result can be NULL, if no result is expected or if the database could |
738 // not be opened. The result object is destroyed after this call. | 742 // not be opened. The result object is destroyed after this call. |
739 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 743 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
740 const WDTypedResult* result) = 0; | 744 const WDTypedResult* result) = 0; |
741 | 745 |
742 protected: | 746 protected: |
743 virtual ~WebDataServiceConsumer() {} | 747 virtual ~WebDataServiceConsumer() {} |
744 }; | 748 }; |
745 | 749 |
746 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 750 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
OLD | NEW |