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

Side by Side Diff: chrome/browser/renderer_host/render_view_host_delegate.h

Issue 4591001: Display a warning when autofill is disabled for a website. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the smarts out of RenderViewHost Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 public: 514 public:
515 // Forms fillable by Autocomplete have been detected in the page. 515 // Forms fillable by Autocomplete have been detected in the page.
516 virtual void FormSubmitted(const webkit_glue::FormData& form) = 0; 516 virtual void FormSubmitted(const webkit_glue::FormData& form) = 0;
517 517
518 // Called to retrieve a list of suggestions from the web database given 518 // Called to retrieve a list of suggestions from the web database given
519 // the name of the field |field_name| and what the user has already typed 519 // the name of the field |field_name| and what the user has already typed
520 // in the field |user_text|. Appeals to the database thread to perform the 520 // in the field |user_text|. Appeals to the database thread to perform the
521 // query. When the database thread is finished, the AutocompleteHistory 521 // query. When the database thread is finished, the AutocompleteHistory
522 // manager retrieves the calling RenderViewHost and then passes the vector 522 // manager retrieves the calling RenderViewHost and then passes the vector
523 // of suggestions to RenderViewHost::AutocompleteSuggestionsReturned. 523 // of suggestions to RenderViewHost::AutocompleteSuggestionsReturned.
524 // Returns true to indicate that FormFieldHistorySuggestionsReturned will be 524 virtual void GetAutocompleteSuggestions(const string16& field_name,
525 // called.
526 virtual bool GetAutocompleteSuggestions(int query_id,
527 const string16& field_name,
528 const string16& user_text) = 0; 525 const string16& user_text) = 0;
529 526
530 // Called when the user has indicated that she wants to remove the specified 527 // Called when the user has indicated that she wants to remove the specified
531 // Autocomplete suggestion from the database. 528 // Autocomplete suggestion from the database.
532 virtual void RemoveAutocompleteEntry(const string16& field_name, 529 virtual void RemoveAutocompleteEntry(const string16& field_name,
533 const string16& value) = 0; 530 const string16& value) = 0;
534 531
535 protected: 532 protected:
536 virtual ~Autocomplete() {} 533 virtual ~Autocomplete() {}
537 }; 534 };
538 535
539 // AutoFill ------------------------------------------------------------------ 536 // AutoFill ------------------------------------------------------------------
540 // Interface for AutoFill-related functions. 537 // Interface for AutoFill-related functions.
541 538
542 class AutoFill { 539 class AutoFill {
543 public: 540 public:
544 // Called when the user submits a form. 541 // Called when the user submits a form.
545 virtual void FormSubmitted(const webkit_glue::FormData& form) = 0; 542 virtual void FormSubmitted(const webkit_glue::FormData& form) = 0;
546 543
547 // Called when the frame has finished loading and there are forms in the 544 // Called when the frame has finished loading and there are forms in the
548 // frame. 545 // frame.
549 virtual void FormsSeen(const std::vector<webkit_glue::FormData>& forms) = 0; 546 virtual void FormsSeen(const std::vector<webkit_glue::FormData>& forms) = 0;
550 547
551 // Called to retrieve a list of AutoFill suggestions from the web database 548 // Called to retrieve a list of AutoFill suggestions from the web database
552 // given the name of the field and what the user has already typed in the 549 // given the name of the field, whether it is autofilled, and what the user
dhollowa 2010/11/15 18:47:57 nit: s/autofilled/auto-filled/
Ilya Sherman 2010/11/15 22:53:32 Done.
553 // field. |form_autofilled| is true if the form containing |field| has any 550 // has already typed in it. If there is a warning to be returned to the
554 // auto-filled fields. Returns true to indicate that 551 // user, it is stored into |values|, with corresponding unique id -1.
555 // RenderViewHost::AutoFillSuggestionsReturned has been called. 552 // Returns true to indicate that RenderViewHost::AutoFillSuggestionsReturned
553 // has been called.
556 virtual bool GetAutoFillSuggestions( 554 virtual bool GetAutoFillSuggestions(
557 int query_id, 555 bool field_autofilled,
558 bool form_autofilled,
559 const webkit_glue::FormField& field) = 0; 556 const webkit_glue::FormField& field) = 0;
560 557
561 // Called to fill the FormData object with AutoFill profile information that 558 // Called to fill the FormData object with AutoFill profile information that
562 // matches the |value|, |unique_id| key. Returns true to indicate that 559 // matches the |value|, |unique_id| key. Returns true to indicate that
563 // RenderViewHost::AutoFillFormDataFilled has been called. 560 // RenderViewHost::AutoFillFormDataFilled has been called.
564 virtual bool FillAutoFillFormData(int query_id, 561 virtual bool FillAutoFillFormData(int query_id,
565 const webkit_glue::FormData& form, 562 const webkit_glue::FormData& form,
566 int unique_id) = 0; 563 int unique_id) = 0;
567 564
568 // Called when the user selects the 'AutoFill Options...' suggestions in the 565 // Called when the user selects the 'AutoFill Options...' suggestions in the
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 bool remember) {} 855 bool remember) {}
859 856
860 // Update the content restrictions, i.e. disable print/copy. 857 // Update the content restrictions, i.e. disable print/copy.
861 virtual void UpdateContentRestrictions(int restrictions) {} 858 virtual void UpdateContentRestrictions(int restrictions) {}
862 859
863 protected: 860 protected:
864 virtual ~RenderViewHostDelegate() {} 861 virtual ~RenderViewHostDelegate() {}
865 }; 862 };
866 863
867 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ 864 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698