Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1560)

Side by Side Diff: chrome/browser/webdata/web_data_service.h

Issue 279001: Move autofill related WebView{Delegate} methods into the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // 50 //
51 typedef enum { 51 typedef enum {
52 BOOL_RESULT = 1, // WDResult<bool> 52 BOOL_RESULT = 1, // WDResult<bool>
53 KEYWORDS_RESULT, // WDResult<WDKeywordsResult> 53 KEYWORDS_RESULT, // WDResult<WDKeywordsResult>
54 INT64_RESULT, // WDResult<int64> 54 INT64_RESULT, // WDResult<int64>
55 PASSWORD_RESULT, // WDResult<std::vector<PasswordForm*>> 55 PASSWORD_RESULT, // WDResult<std::vector<PasswordForm*>>
56 #if defined(OS_WIN) 56 #if defined(OS_WIN)
57 PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo> 57 PASSWORD_IE7_RESULT, // WDResult<IE7PasswordInfo>
58 #endif 58 #endif
59 WEB_APP_IMAGES, // WDResult<WDAppImagesResult> 59 WEB_APP_IMAGES, // WDResult<WDAppImagesResult>
60 AUTOFILL_VALUE_RESULT, // WDResult<std::vector<std::wstring>> 60 AUTOFILL_VALUE_RESULT, // WDResult<std::vector<string16>>
61 } WDResultType; 61 } WDResultType;
62 62
63 // Result from GetWebAppImages. 63 // Result from GetWebAppImages.
64 struct WDAppImagesResult { 64 struct WDAppImagesResult {
65 WDAppImagesResult() : has_all_images(false) {} 65 WDAppImagesResult() : has_all_images(false) {}
66 66
67 // True if SetWebAppHasAllImages(true) was invoked. 67 // True if SetWebAppHasAllImages(true) was invoked.
68 bool has_all_images; 68 bool has_all_images;
69 69
70 // The images, may be empty. 70 // The images, may be empty.
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 ////////////////////////////////////////////////////////////////////////////// 375 //////////////////////////////////////////////////////////////////////////////
376 376
377 // Schedules a task to add form elements to the web database. 377 // Schedules a task to add form elements to the web database.
378 void AddAutofillFormElements( 378 void AddAutofillFormElements(
379 const std::vector<webkit_glue::AutofillForm::Element>& elements); 379 const std::vector<webkit_glue::AutofillForm::Element>& elements);
380 380
381 // Initiates the request for a vector of values which have been entered in 381 // Initiates the request for a vector of values which have been entered in
382 // form input fields named |name|. The method OnWebDataServiceRequestDone of 382 // form input fields named |name|. The method OnWebDataServiceRequestDone of
383 // |consumer| gets called back when the request is finished, with the vector 383 // |consumer| gets called back when the request is finished, with the vector
384 // included in the argument |result|. 384 // included in the argument |result|.
385 Handle GetFormValuesForElementName(const std::wstring& name, 385 Handle GetFormValuesForElementName(const string16& name,
386 const std::wstring& prefix, 386 const string16& prefix,
387 int limit, 387 int limit,
388 WebDataServiceConsumer* consumer); 388 WebDataServiceConsumer* consumer);
389 389
390 // Removes form elements recorded for autofill from the database. 390 // Removes form elements recorded for autofill from the database.
391 void RemoveFormElementsAddedBetween(const base::Time& delete_begin, 391 void RemoveFormElementsAddedBetween(const base::Time& delete_begin,
392 const base::Time& delete_end); 392 const base::Time& delete_end);
393 void RemoveFormValueForElementName(const std::wstring& name, 393 void RemoveFormValueForElementName(const string16& name,
394 const std::wstring& value); 394 const string16& value);
395 395
396 protected: 396 protected:
397 friend class TemplateURLModelTest; 397 friend class TemplateURLModelTest;
398 friend class TemplateURLModelTestingProfile; 398 friend class TemplateURLModelTestingProfile;
399 friend class WebDataServiceTest; 399 friend class WebDataServiceTest;
400 friend class WebDataRequest; 400 friend class WebDataRequest;
401 401
402 // This is invoked by the unit test; path is the path of the Web Data file. 402 // This is invoked by the unit test; path is the path of the Web Data file.
403 bool InitWithPath(const FilePath& path); 403 bool InitWithPath(const FilePath& path);
404 404
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 461
462 ////////////////////////////////////////////////////////////////////////////// 462 //////////////////////////////////////////////////////////////////////////////
463 // 463 //
464 // Autofill. 464 // Autofill.
465 // 465 //
466 ////////////////////////////////////////////////////////////////////////////// 466 //////////////////////////////////////////////////////////////////////////////
467 void AddAutofillFormElementsImpl( 467 void AddAutofillFormElementsImpl(
468 GenericRequest<std::vector<webkit_glue::AutofillForm::Element> >* 468 GenericRequest<std::vector<webkit_glue::AutofillForm::Element> >*
469 request); 469 request);
470 void GetFormValuesForElementNameImpl(WebDataRequest* request, 470 void GetFormValuesForElementNameImpl(WebDataRequest* request,
471 const std::wstring& name, const std::wstring& prefix, int limit); 471 const string16& name, const string16& prefix, int limit);
472 void RemoveFormElementsAddedBetweenImpl( 472 void RemoveFormElementsAddedBetweenImpl(
473 GenericRequest2<base::Time, base::Time>* request); 473 GenericRequest2<base::Time, base::Time>* request);
474 void RemoveFormValueForElementNameImpl( 474 void RemoveFormValueForElementNameImpl(
475 GenericRequest2<std::wstring, std::wstring>* request); 475 GenericRequest2<string16, string16>* request);
476 476
477 ////////////////////////////////////////////////////////////////////////////// 477 //////////////////////////////////////////////////////////////////////////////
478 // 478 //
479 // Web Apps. 479 // Web Apps.
480 // 480 //
481 ////////////////////////////////////////////////////////////////////////////// 481 //////////////////////////////////////////////////////////////////////////////
482 482
483 void SetWebAppImageImpl(GenericRequest2<GURL,SkBitmap>* request); 483 void SetWebAppImageImpl(GenericRequest2<GURL,SkBitmap>* request);
484 484
485 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL,bool>* request); 485 void SetWebAppHasAllImagesImpl(GenericRequest2<GURL,bool>* request);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 public: 535 public:
536 536
537 // Called when a request is done. h uniquely identifies the request. 537 // Called when a request is done. h uniquely identifies the request.
538 // result can be NULL, if no result is expected or if the database could 538 // result can be NULL, if no result is expected or if the database could
539 // not be opened. The result object is destroyed after this call. 539 // not be opened. The result object is destroyed after this call.
540 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, 540 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,
541 const WDTypedResult* result) = 0; 541 const WDTypedResult* result) = 0;
542 }; 542 };
543 543
544 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__ 544 #endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_H__
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_delegate.h ('k') | chrome/browser/webdata/web_data_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698