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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate.h

Issue 8353025: External autofill delegates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Carnitasify Created 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "base/string16.h"
12
13 class AutofillManager;
14 class TabContentsWrapper;
15
16 namespace webkit_glue {
17 struct FormData;
18 struct FormField;
19 } // namespace webkit_glue
20
21 // Delegate for external processing of autocomplete and autofill
22 // display and selection.
23 class AutofillExternalDelegate {
24 public:
25
26 virtual ~AutofillExternalDelegate();
Ilya Sherman 2011/10/26 11:09:58 nit: Should the constructor for this class be prot
27
28 // Records and associates a query_id with web form data. Called
29 // when the renderer posts an autofill query to the browser.
30 virtual void OnQuery(int query_id,
31 const webkit_glue::FormData& form,
32 const webkit_glue::FormField& field) = 0;
33
34 // Records query results. Display them to the user with an external
Ilya Sherman 2011/10/26 11:09:58 nit: "Display" -> "Displays"?
35 // autofill popup that lives completely in the browser. Called when
36 // an autofill query result is available.
37 virtual void OnSuggestionsReturned(
38 int query_id,
39 const std::vector<string16>& autofill_values,
40 const std::vector<string16>& autofill_labels,
41 const std::vector<string16>& autofill_icons,
42 const std::vector<int>& autofill_unique_ids) = 0;
43
44 // Platforms that wish to implement an external autofill delegate
45 // MUST implement this. The 1st arg is the tab contents that owns
46 // this delegate; the second is the autofill manager owned by the
47 // tab contents.
48 static AutofillExternalDelegate* create(TabContentsWrapper*,
dhollowa 2011/10/26 16:14:22 nit: this may be non-trivial, so title-case is mor
49 AutofillManager*);
50 };
51
52 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698