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

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

Issue 12302034: Always Close the Autofill UI through the same path (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding Tests Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 const std::vector<int>& autofill_unique_ids); 120 const std::vector<int>& autofill_unique_ids);
121 121
122 // Create the popup if it doesn't already exist. |element_bounds| is the 122 // Create the popup if it doesn't already exist. |element_bounds| is the
123 // bounding rect for the element it is popping up for. 123 // bounding rect for the element it is popping up for.
124 virtual void EnsurePopupForElement(const gfx::RectF& element_bounds); 124 virtual void EnsurePopupForElement(const gfx::RectF& element_bounds);
125 125
126 content::WebContents* web_contents() { return web_contents_; } 126 content::WebContents* web_contents() { return web_contents_; }
127 127
128 AutofillPopupControllerImpl* controller() { return controller_; } 128 AutofillPopupControllerImpl* controller() { return controller_; }
129 129
130 // For testing purposes only.
131 void set_controller(base::WeakPtr<AutofillPopupControllerImpl> controller) {
132 controller_ = controller;
133 }
134
130 private: 135 private:
131 // Fills the form with the Autofill data corresponding to |unique_id|. 136 // Fills the form with the Autofill data corresponding to |unique_id|.
132 // If |is_preview| is true then this is just a preview to show the user what 137 // If |is_preview| is true then this is just a preview to show the user what
133 // would be selected and if |is_preview| is false then the user has selected 138 // would be selected and if |is_preview| is false then the user has selected
134 // this data. 139 // this data.
135 void FillAutofillFormData(int unique_id, bool is_preview); 140 void FillAutofillFormData(int unique_id, bool is_preview);
136 141
137 // Handle applying any Autofill warnings to the Autofill popup. 142 // Handle applying any Autofill warnings to the Autofill popup.
138 void ApplyAutofillWarnings(std::vector<string16>* autofill_values, 143 void ApplyAutofillWarnings(std::vector<string16>* autofill_values,
139 std::vector<string16>* autofill_labels, 144 std::vector<string16>* autofill_labels,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // The current data list values. 198 // The current data list values.
194 std::vector<string16> data_list_values_; 199 std::vector<string16> data_list_values_;
195 std::vector<string16> data_list_labels_; 200 std::vector<string16> data_list_labels_;
196 std::vector<string16> data_list_icons_; 201 std::vector<string16> data_list_icons_;
197 std::vector<int> data_list_unique_ids_; 202 std::vector<int> data_list_unique_ids_;
198 203
199 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); 204 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate);
200 }; 205 };
201 206
202 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ 207 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698