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

Unified Diff: third_party/WebKit/fake_gen/web/api/event_target.h

Issue 2591803002: NOT FOR LANDING: Thread the needle through all webmodules.
Patch Set: AddEventListener sketched out. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/fake_gen/web/api/event.cc ('k') | third_party/WebKit/fake_gen/web/api/event_target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/fake_gen/web/api/event_target.h
diff --git a/third_party/WebKit/fake_gen/web/api/event_target.h b/third_party/WebKit/fake_gen/web/api/event_target.h
new file mode 100644
index 0000000000000000000000000000000000000000..1a12a3ed704d0b7188a5a8a12db26e0a87327783
--- /dev/null
+++ b/third_party/WebKit/fake_gen/web/api/event_target.h
@@ -0,0 +1,66 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file has been auto-generated by code_generator_web_module.py.
+// DO NOT MODIFY!
+
+// This file has been generated from the Jinja2 template in
+// third_party/WebKit/Source/bindings/templates/web_module_interface.h.tmpl
+
+// clang-format off
+
+#ifndef WEB_API_EVENT_TARGET_H
+#define WEB_API_EVENT_TARGET_H
+
+#include "platform/heap/Handle.h"
+// TODO(dglazkov): How is this added?
+#include "web/api/event.h"
+// TODO(dglazkov): How is this added?
+#include "wtf/Functional.h"
+
+namespace blink {
+class EventTarget;
+class AddEventListenerOptions;
+class EventListenerOptions;
+}
+
+namespace web {
+
+class EventTarget : public blink::GarbageCollected<EventTarget> {
+ public:
+ virtual ~EventTarget() = default;
+
+ static EventTarget* Create(blink::EventTarget*);
+
+ DECLARE_TRACE();
+
+ // TODO(dglazkov): How is this generated
+ typedef Function<void(Event*)> EventListener;
+ // TODO(dglazkov): How is type an AtomicString?
+ // TODO(dglazkov): How is AddEventListenerOptions picked from union type?
+ // TOOD(dglazkov): How does AddEventListenerOptions stay blink::?
+ // TODO(dglazkov): How is the "optional" resulting in two functions?
+ void AddEventListener(const AtomicString& type,
+ std::unique_ptr<EventListener> listener);
+ void AddEventListener(const AtomicString& type,
+ std::unique_ptr<EventListener> listener,
+ const blink::AddEventListenerOptions& options);
+ void RemoveEventListeber(const AtomicString& type,
+ std::unique_ptr<EventListener> listener);
+ void RemoveEventListeber(const AtomicString& type,
+ std::unique_ptr<EventListener> listener,
+ const blink::EventListenerOptions& options);
+ bool DispatchEvent(Event*);
+
+ protected:
+ explicit EventTarget(blink::EventTarget* event_target);
+ blink::EventTarget* event_target() const;
+
+ private:
+ blink::Member<blink::EventTarget> event_target_;
+};
+
+} // namespace web
+
+#endif // WEB_API_EVENT_TARGET_H
« no previous file with comments | « third_party/WebKit/fake_gen/web/api/event.cc ('k') | third_party/WebKit/fake_gen/web/api/event_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698