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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // specified web app. | 352 // specified web app. |
353 Handle GetWebAppImages(const GURL& app_url, WebDataServiceConsumer* consumer); | 353 Handle GetWebAppImages(const GURL& app_url, WebDataServiceConsumer* consumer); |
354 | 354 |
355 ////////////////////////////////////////////////////////////////////////////// | 355 ////////////////////////////////////////////////////////////////////////////// |
356 // | 356 // |
357 // Web Intents | 357 // Web Intents |
358 // | 358 // |
359 ////////////////////////////////////////////////////////////////////////////// | 359 ////////////////////////////////////////////////////////////////////////////// |
360 | 360 |
361 // Adds a web intent provider registration. | 361 // Adds a web intent provider registration. |
362 void AddWebIntent(const WebIntentServiceData& service); | 362 void AddWebIntent(const webkit_glue::WebIntentServiceData& service); |
363 | 363 |
364 // Removes a web intent provider registration. | 364 // Removes a web intent provider registration. |
365 void RemoveWebIntent(const WebIntentServiceData& service); | 365 void RemoveWebIntent(const webkit_glue::WebIntentServiceData& service); |
366 | 366 |
367 // Get all web intent providers registered for the specified |action|. | 367 // Get all web intent providers registered for the specified |action|. |
368 // |consumer| must not be NULL. | 368 // |consumer| must not be NULL. |
369 Handle GetWebIntents(const string16& action, | 369 Handle GetWebIntents(const string16& action, |
370 WebDataServiceConsumer* consumer); | 370 WebDataServiceConsumer* consumer); |
371 | 371 |
372 // Get all web intent providers registered. |consumer| must not be NULL. | 372 // Get all web intent providers registered. |consumer| must not be NULL. |
373 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); | 373 Handle GetAllWebIntents(WebDataServiceConsumer* consumer); |
374 | 374 |
375 ////////////////////////////////////////////////////////////////////////////// | 375 ////////////////////////////////////////////////////////////////////////////// |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 void SetWebAppImageImpl(GenericRequest2<GURL, SkBitmap>* request); | 604 void SetWebAppImageImpl(GenericRequest2<GURL, SkBitmap>* request); |
605 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL, bool>* request); | 605 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL, bool>* request); |
606 void RemoveWebAppImpl(GenericRequest<GURL>* request); | 606 void RemoveWebAppImpl(GenericRequest<GURL>* request); |
607 void GetWebAppImagesImpl(GenericRequest<GURL>* request); | 607 void GetWebAppImagesImpl(GenericRequest<GURL>* request); |
608 | 608 |
609 ////////////////////////////////////////////////////////////////////////////// | 609 ////////////////////////////////////////////////////////////////////////////// |
610 // | 610 // |
611 // Web Intents. | 611 // Web Intents. |
612 // | 612 // |
613 ////////////////////////////////////////////////////////////////////////////// | 613 ////////////////////////////////////////////////////////////////////////////// |
614 void AddWebIntentImpl(GenericRequest<WebIntentServiceData>* request); | 614 void AddWebIntentImpl( |
615 void RemoveWebIntentImpl(GenericRequest<WebIntentServiceData>* request); | 615 GenericRequest<webkit_glue::WebIntentServiceData>* request); |
| 616 void RemoveWebIntentImpl( |
| 617 GenericRequest<webkit_glue::WebIntentServiceData>* request); |
616 void GetWebIntentsImpl(GenericRequest<string16>* request); | 618 void GetWebIntentsImpl(GenericRequest<string16>* request); |
617 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); | 619 void GetAllWebIntentsImpl(GenericRequest<std::string>* request); |
618 | 620 |
619 ////////////////////////////////////////////////////////////////////////////// | 621 ////////////////////////////////////////////////////////////////////////////// |
620 // | 622 // |
621 // Token Service. | 623 // Token Service. |
622 // | 624 // |
623 ////////////////////////////////////////////////////////////////////////////// | 625 ////////////////////////////////////////////////////////////////////////////// |
624 | 626 |
625 void RemoveAllTokensImpl(GenericRequest<std::string>* request); | 627 void RemoveAllTokensImpl(GenericRequest<std::string>* request); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 // result can be NULL, if no result is expected or if the database could | 728 // result can be NULL, if no result is expected or if the database could |
727 // not be opened. The result object is destroyed after this call. | 729 // not be opened. The result object is destroyed after this call. |
728 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, | 730 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
729 const WDTypedResult* result) = 0; | 731 const WDTypedResult* result) = 0; |
730 | 732 |
731 protected: | 733 protected: |
732 virtual ~WebDataServiceConsumer() {} | 734 virtual ~WebDataServiceConsumer() {} |
733 }; | 735 }; |
734 | 736 |
735 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ | 737 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ |
OLD | NEW |