| 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 13 matching lines...) Expand all Loading... |
| 24 class CreditCard; | 24 class CreditCard; |
| 25 class GURL; | 25 class GURL; |
| 26 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
| 27 struct IE7PasswordInfo; | 27 struct IE7PasswordInfo; |
| 28 #endif | 28 #endif |
| 29 class MessageLoop; | 29 class MessageLoop; |
| 30 class Profile; | 30 class Profile; |
| 31 class SkBitmap; | 31 class SkBitmap; |
| 32 class TemplateURL; | 32 class TemplateURL; |
| 33 class WebDatabase; | 33 class WebDatabase; |
| 34 struct WebIntentServiceData; | |
| 35 | 34 |
| 36 namespace base { | 35 namespace base { |
| 37 class Thread; | 36 class Thread; |
| 38 } | 37 } |
| 39 | 38 |
| 40 namespace webkit_glue { | 39 namespace webkit_glue { |
| 41 struct FormField; | 40 struct FormField; |
| 42 struct PasswordForm; | 41 struct PasswordForm; |
| 42 struct WebIntentServiceData; |
| 43 } | 43 } |
| 44 | 44 |
| 45 //////////////////////////////////////////////////////////////////////////////// | 45 //////////////////////////////////////////////////////////////////////////////// |
| 46 // | 46 // |
| 47 // WebDataService is a generic data repository for meta data associated with | 47 // WebDataService is a generic data repository for meta data associated with |
| 48 // web pages. All data is retrieved and archived in an asynchronous way. | 48 // web pages. All data is retrieved and archived in an asynchronous way. |
| 49 // | 49 // |
| 50 // All requests return a handle. The handle can be used to cancel the request. | 50 // All requests return a handle. The handle can be used to cancel the request. |
| 51 // | 51 // |
| 52 //////////////////////////////////////////////////////////////////////////////// | 52 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 // specified web app. | 357 // specified web app. |
| 358 Handle GetWebAppImages(const GURL& app_url, WebDataServiceConsumer* consumer); | 358 Handle GetWebAppImages(const GURL& app_url, WebDataServiceConsumer* consumer); |
| 359 | 359 |
| 360 ////////////////////////////////////////////////////////////////////////////// | 360 ////////////////////////////////////////////////////////////////////////////// |
| 361 // | 361 // |
| 362 // Web Intents | 362 // Web Intents |
| 363 // | 363 // |
| 364 ////////////////////////////////////////////////////////////////////////////// | 364 ////////////////////////////////////////////////////////////////////////////// |
| 365 | 365 |
| 366 // Adds a web intent provider registration. | 366 // Adds a web intent provider registration. |
| 367 void AddWebIntent(const WebIntentServiceData& service); | 367 void AddWebIntent(const webkit_glue::WebIntentServiceData& service); |
| 368 | 368 |
| 369 // Removes a web intent provider registration. | 369 // Removes a web intent provider registration. |
| 370 void RemoveWebIntent(const WebIntentServiceData& service); | 370 void RemoveWebIntent(const webkit_glue::WebIntentServiceData& service); |
| 371 | 371 |
| 372 // Get all web intent providers registered for the specified |action|. | 372 // Get all web intent providers registered for the specified |action|. |
| 373 // |consumer| must not be NULL. | 373 // |consumer| must not be NULL. |
| 374 Handle GetWebIntents(const string16& action, | 374 Handle GetWebIntents(const string16& action, |
| 375 WebDataServiceConsumer* consumer); | 375 WebDataServiceConsumer* consumer); |
| 376 | 376 |
| 377 // Get all web intent providers registered. |consumer| must not be NULL. | 377 // Get all web intent providers registered. |consumer| must not be NULL. |
| 378 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); | 378 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); |
| 379 | 379 |
| 380 ////////////////////////////////////////////////////////////////////////////// | 380 ////////////////////////////////////////////////////////////////////////////// |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 void SetWebAppImageImpl(GenericRequest2<GURL, SkBitmap>* request); | 609 void SetWebAppImageImpl(GenericRequest2<GURL, SkBitmap>* request); |
| 610 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL, bool>* request); | 610 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL, bool>* request); |
| 611 void RemoveWebAppImpl(GenericRequest<GURL>* request); | 611 void RemoveWebAppImpl(GenericRequest<GURL>* request); |
| 612 void GetWebAppImagesImpl(GenericRequest<GURL>* request); | 612 void GetWebAppImagesImpl(GenericRequest<GURL>* request); |
| 613 | 613 |
| 614 ////////////////////////////////////////////////////////////////////////////// | 614 ////////////////////////////////////////////////////////////////////////////// |
| 615 // | 615 // |
| 616 // Web Intents. | 616 // Web Intents. |
| 617 // | 617 // |
| 618 ////////////////////////////////////////////////////////////////////////////// | 618 ////////////////////////////////////////////////////////////////////////////// |
| 619 void AddWebIntentImpl(GenericRequest<WebIntentServiceData>* request); | 619 void AddWebIntentImpl( |
| 620 void RemoveWebIntentImpl(GenericRequest<WebIntentServiceData>* request); | 620 GenericRequest<webkit_glue::WebIntentServiceData>* request); |
| 621 void RemoveWebIntentImpl( |
| 622 GenericRequest<webkit_glue::WebIntentServiceData>* request); |
| 621 void GetWebIntentsImpl(GenericRequest<string16>* request); | 623 void GetWebIntentsImpl(GenericRequest<string16>* request); |
| 622 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); | 624 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); |
| 623 | 625 |
| 624 ////////////////////////////////////////////////////////////////////////////// | 626 ////////////////////////////////////////////////////////////////////////////// |
| 625 // | 627 // |
| 626 // Token Service. | 628 // Token Service. |
| 627 // | 629 // |
| 628 ////////////////////////////////////////////////////////////////////////////// | 630 ////////////////////////////////////////////////////////////////////////////// |
| 629 | 631 |
| 630 void RemoveAllTokensImpl(GenericRequest<std::string>* request); | 632 void RemoveAllTokensImpl(GenericRequest<std::string>* request); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 // result can be NULL, if no result is expected or if the database could | 733 // result can be NULL, if no result is expected or if the database could |
| 732 // not be opened. The result object is destroyed after this call. | 734 // not be opened. The result object is destroyed after this call. |
| 733 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 735 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 734 const WDTypedResult* result) = 0; | 736 const WDTypedResult* result) = 0; |
| 735 | 737 |
| 736 protected: | 738 protected: |
| 737 virtual ~WebDataServiceConsumer() {} | 739 virtual ~WebDataServiceConsumer() {} |
| 738 }; | 740 }; |
| 739 | 741 |
| 740 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 742 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
| OLD | NEW |