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

Unified Diff: webkit/glue/editor_client_impl.h

Issue 11479: New take at implementing autofill using the editor client API (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/dom_operations.cc ('k') | webkit/glue/editor_client_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/editor_client_impl.h
===================================================================
--- webkit/glue/editor_client_impl.h (revision 5576)
+++ webkit/glue/editor_client_impl.h (working copy)
@@ -6,6 +6,7 @@
#define WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__
#include "base/compiler_specific.h"
+#include "base/task.h"
#include "build/build_config.h"
@@ -17,6 +18,7 @@
namespace WebCore {
class Frame;
+class HTMLInputElement;
class Node;
class PlatformKeyboardEvent;
}
@@ -103,9 +105,6 @@
virtual void setInputMethodState(bool enabled);
void SetUseEditorDelegate(bool value) { use_editor_delegate_ = value; }
- // HACK for webkit bug #16976.
- // TODO (timsteele): Clean this up once webkit bug 16976 is fixed.
- void PreserveSelection();
// It would be better to add these methods to the objects they describe, but
// those are in WebCore and therefore inaccessible.
@@ -123,21 +122,23 @@
void ModifySelection(WebCore::Frame* frame,
WebCore::KeyboardEvent* event);
+ void DoAutofill(WebCore::HTMLInputElement* input_element, bool backspace);
+
protected:
WebViewImpl* web_view_;
bool use_editor_delegate_;
bool in_redo_;
- // Should preserve the selection in next call to shouldChangeSelectedRange.
- bool preserve_;
-
- // Points to an HTMLInputElement that was just autocompleted (else NULL),
- // for use by respondToChangedContents().
- WebCore::Element* pending_inline_autocompleted_element_;
-
typedef std::deque<WTF::RefPtr<WebCore::EditCommand> > EditCommandStack;
EditCommandStack undo_stack_;
EditCommandStack redo_stack_;
+
+ private:
+ // Whether the last entered key was a backspace.
+ bool backspace_pressed_;
+
+ // The method factory used to post autofill related tasks.
+ ScopedRunnableMethodFactory<EditorClientImpl> autofill_factory_;
};
#endif // WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__
« no previous file with comments | « webkit/glue/dom_operations.cc ('k') | webkit/glue/editor_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698