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

Unified Diff: Source/core/html/HTMLFormElement.h

Issue 228783007: rAc: make requestAutocomplete() return a promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: merge Created 6 years, 8 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
« no previous file with comments | « Source/core/dom/DOMException.h ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFormElement.h
diff --git a/Source/core/html/HTMLFormElement.h b/Source/core/html/HTMLFormElement.h
index fb7bd5ba012387f76339748f1f1eb3d01149b515..272e998d668e596fecf789bd5b978811c3b30005 100644
--- a/Source/core/html/HTMLFormElement.h
+++ b/Source/core/html/HTMLFormElement.h
@@ -29,6 +29,7 @@
#include "core/html/forms/RadioButtonGroupScope.h"
#include "core/loader/FormSubmission.h"
#include "wtf/OwnPtr.h"
+#include "wtf/RefPtr.h"
#include "wtf/WeakPtr.h"
namespace WTF{
@@ -37,12 +38,14 @@ class TextEncoding;
namespace WebCore {
+class AutocompleteRequest;
class Event;
class FormAssociatedElement;
class FormData;
class HTMLFormControlElement;
class HTMLImageElement;
class HTMLInputElement;
+class ScriptPromise;
class HTMLFormElement FINAL : public HTMLElement {
public:
@@ -101,7 +104,7 @@ public:
AutocompleteResultErrorInvalid,
};
- void requestAutocomplete(const Dictionary&);
+ ScriptPromise requestAutocomplete(const Dictionary&);
void finishRequestAutocomplete(AutocompleteResult);
DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete);
@@ -175,9 +178,11 @@ private:
bool m_wasDemoted;
+ void doFinishRequestAutocomplete(AutocompleteResult, PassOwnPtr<AutocompleteRequest>);
void requestAutocompleteTimerFired(Timer<HTMLFormElement>*);
- WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_pendingAutocompleteEvents;
+ OwnPtr<AutocompleteRequest> m_pendingAutocompleteRequest;
+ Vector<OwnPtr<AutocompleteRequest> > m_finishedAutocompleteRequests;
Timer<HTMLFormElement> m_requestAutocompleteTimer;
};
« no previous file with comments | « Source/core/dom/DOMException.h ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698