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

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: Needle threaded all the way. Created 4 years 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: 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..965003d0c7404e135d226c2c45035f7e640e6cde
--- /dev/null
+++ b/third_party/WebKit/fake_gen/web/api/event_target.h
@@ -0,0 +1,58 @@
+// 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 "core/events/EventTarget.h"
+
+namespace web {
+namespace api {
+
+class EventTarget : public blink::GarbageCollectedFinalized<EventTarget> {
+ public:
+ explicit EventTarget(blink::EventTarget* event_target)
+ : event_target_(event_target) {}
+ virtual ~EventTarget() {}
+
+ using Visitor = blink::Visitor;
+ using InlinedGlobalMarkingVisitor = blink::InlinedGlobalMarkingVisitor;
dglazkov 2016/12/22 16:36:13 This is sort of a hack. Maybe I could patch the ma
haraken 2016/12/23 15:16:42 Sounds good.
+ DEFINE_INLINE_TRACE() { visitor->trace(event_target_); };
+
+ // // Should generate all three: optional + union of AddEventListenerOptions
+ // // and boolean.
+ // void AddEventListener(String type, EventListener* listener,
+ // AddEventListenerOptions* options) {
dglazkov 2016/12/22 16:36:13 The idea of generating web::AddEventListenerOption
haraken 2016/12/23 15:16:42 Agreed. Trying to redefine everything in the web n
+ // // EXCEPTION: Have to do this because options argument is a &ref.
+ // blink::AddEventListenerOptions blinkOptions = options->options();
+ // event_target()->addEventListener(type, listener->listener(), blinkOptions);
+ // }
+
+ // void AddEventListener(String type, EventListener* listener, bool options) {
+ // event_target()->addEventListener(type, listener->listener(), options);
+ // }
+
+ // void AddEventListener(String type, EventListener* listener) {
+ // event_target()->addEventListener(type, listener->listener());
+ // }
+
+ protected:
+ blink::EventTarget* event_target() const { return event_target_; }
+
+ private:
+ blink::Member<blink::EventTarget> event_target_;
+};
+
+} // namespace api
+} // namespace web
+
+#endif // WEB_API_NODE_H

Powered by Google App Engine
This is Rietveld 408576698