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

Unified Diff: chrome/browser/autofill/autofill_external_delegate.h

Issue 9235072: Adding Mouse Support for new GTK Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/autofill_external_delegate.h
diff --git a/chrome/browser/autofill/autofill_external_delegate.h b/chrome/browser/autofill/autofill_external_delegate.h
index 20d15bb6fc82400d891c92fe9049b5113df89896..d9212ea90028875a1ac1ba6c5f09b23940b74ad0 100644
--- a/chrome/browser/autofill/autofill_external_delegate.h
+++ b/chrome/browser/autofill/autofill_external_delegate.h
@@ -8,7 +8,9 @@
#include <vector>
+#include "base/compiler_specific.h"
#include "base/string16.h"
+#include "webkit/forms/form_data.h"
#include "webkit/forms/form_field.h"
class AutofillManager;
@@ -18,12 +20,6 @@ namespace gfx {
class Rect;
}
-namespace webkit {
-namespace forms {
-struct FormData;
-}
-}
-
// TODO(csharp): A lot of the logic in this class is copied from autofillagent.
// Once Autofill is moved out of WebKit this class should be the only home for
// this logic. See http://crbug.com/51644
@@ -37,7 +33,7 @@ class AutofillExternalDelegate {
// When using an external Autofill delegate. Allows Chrome to tell
// WebKit which Autofill selection has been chosen.
// TODO(jrg): add feedback mechanism for hover on relevant platforms.
- void SelectAutofillSuggestionAtIndex(int listIndex);
+ void SelectAutofillSuggestionAtIndex(int unique_id, int list_index);
// Records and associates a query_id with web form data. Called
// when the renderer posts an Autofill query to the browser. |bounds|
@@ -75,6 +71,10 @@ class AutofillExternalDelegate {
// used to help record the metrics of when a new popup is shown.
void DidEndTextFieldEditing();
+ // Inform the delegate that an autofill suggestion have been chosen.
+ void didAcceptAutofillSuggestions(
+ string16 value,int unique_id, unsigned index);
+
protected:
explicit AutofillExternalDelegate(TabContentsWrapper* tab_contents_wrapper,
AutofillManager* autofill_manager);
@@ -103,7 +103,8 @@ class AutofillExternalDelegate {
// out of date responses.
int autofill_query_id_;
- // The current field selected by Autofill.
+ // The current form and field selected by Autofill.
+ webkit::forms::FormData autofill_query_form_;
webkit::forms::FormField autofill_query_field_;
// Should we display a warning if Autofill is disabled?
@@ -113,6 +114,12 @@ class AutofillExternalDelegate {
// currently editing? Used to keep track of state for metrics logging.
bool has_shown_autofill_popup_for_current_edit_;
+ // The menu index of the "Clear" menu item.
+ int suggestions_clear_index_;
+
+ // The menu index of the "Autofill options..." menu item.
+ int suggestions_options_index_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate);
};
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_external_delegate.cc » ('j') | chrome/renderer/autofill/autofill_agent.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698