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

Side by Side Diff: components/autofill/core/browser/autofill_client.h

Issue 772253003: Create an autofill Suggestion class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review 2 Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 15 matching lines...) Expand all
26 26
27 namespace autofill { 27 namespace autofill {
28 28
29 class AutofillMetrics; 29 class AutofillMetrics;
30 class AutofillPopupDelegate; 30 class AutofillPopupDelegate;
31 class AutofillWebDataService; 31 class AutofillWebDataService;
32 class CreditCard; 32 class CreditCard;
33 class FormStructure; 33 class FormStructure;
34 class PersonalDataManager; 34 class PersonalDataManager;
35 struct FormData; 35 struct FormData;
36 struct Suggestion;
36 37
37 // A client interface that needs to be supplied to the Autofill component by the 38 // A client interface that needs to be supplied to the Autofill component by the
38 // embedder. 39 // embedder.
39 // 40 //
40 // Each client instance is associated with a given context within which an 41 // Each client instance is associated with a given context within which an
41 // AutofillManager is used (e.g. a single tab), so when we say "for the client" 42 // AutofillManager is used (e.g. a single tab), so when we say "for the client"
42 // below, we mean "in the execution context the client is associated with" (e.g. 43 // below, we mean "in the execution context the client is associated with" (e.g.
43 // for the tab the AutofillManager is attached to). 44 // for the tab the AutofillManager is attached to).
44 class AutofillClient { 45 class AutofillClient {
45 public: 46 public:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const FormData& form, 96 const FormData& form,
96 const GURL& source_url, 97 const GURL& source_url,
97 const ResultCallback& callback) = 0; 98 const ResultCallback& callback) = 0;
98 99
99 // Shows an Autofill popup with the given |values|, |labels|, |icons|, and 100 // Shows an Autofill popup with the given |values|, |labels|, |icons|, and
100 // |identifiers| for the element at |element_bounds|. |delegate| will be 101 // |identifiers| for the element at |element_bounds|. |delegate| will be
101 // notified of popup events. 102 // notified of popup events.
102 virtual void ShowAutofillPopup( 103 virtual void ShowAutofillPopup(
103 const gfx::RectF& element_bounds, 104 const gfx::RectF& element_bounds,
104 base::i18n::TextDirection text_direction, 105 base::i18n::TextDirection text_direction,
105 const std::vector<base::string16>& values, 106 const std::vector<Suggestion>& suggestions,
106 const std::vector<base::string16>& labels,
107 const std::vector<base::string16>& icons,
108 const std::vector<int>& identifiers,
109 base::WeakPtr<AutofillPopupDelegate> delegate) = 0; 107 base::WeakPtr<AutofillPopupDelegate> delegate) = 0;
110 108
111 // Update the data list values shown by the Autofill popup, if visible. 109 // Update the data list values shown by the Autofill popup, if visible.
112 virtual void UpdateAutofillPopupDataListValues( 110 virtual void UpdateAutofillPopupDataListValues(
113 const std::vector<base::string16>& values, 111 const std::vector<base::string16>& values,
114 const std::vector<base::string16>& labels) = 0; 112 const std::vector<base::string16>& labels) = 0;
115 113
116 // Hide the Autofill popup if one is currently showing. 114 // Hide the Autofill popup if one is currently showing.
117 virtual void HideAutofillPopup() = 0; 115 virtual void HideAutofillPopup() = 0;
118 116
(...skipping 11 matching lines...) Expand all
130 const base::string16& autofilled_value, 128 const base::string16& autofilled_value,
131 const base::string16& profile_full_name) = 0; 129 const base::string16& profile_full_name) = 0;
132 130
133 // Informs the client that a user gesture has been observed. 131 // Informs the client that a user gesture has been observed.
134 virtual void OnFirstUserGestureObserved() = 0; 132 virtual void OnFirstUserGestureObserved() = 0;
135 }; 133 };
136 134
137 } // namespace autofill 135 } // namespace autofill
138 136
139 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ 137 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698