Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // This file has been auto-generated by code_generator_web_module.py. | |
| 6 // DO NOT MODIFY! | |
| 7 | |
| 8 // This file has been generated from the Jinja2 template in | |
| 9 // third_party/WebKit/Source/bindings/templates/web_module_interface.h.tmpl | |
| 10 | |
| 11 // clang-format off | |
| 12 | |
| 13 #ifndef WEB_API_EVENT_TARGET_H | |
| 14 #define WEB_API_EVENT_TARGET_H | |
| 15 | |
| 16 #include "core/events/EventTarget.h" | |
| 17 | |
| 18 namespace web { | |
| 19 namespace api { | |
| 20 | |
| 21 class EventTarget : public blink::GarbageCollectedFinalized<EventTarget> { | |
| 22 public: | |
| 23 explicit EventTarget(blink::EventTarget* event_target) | |
| 24 : event_target_(event_target) {} | |
| 25 virtual ~EventTarget() {} | |
| 26 | |
| 27 using Visitor = blink::Visitor; | |
| 28 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.
| |
| 29 DEFINE_INLINE_TRACE() { visitor->trace(event_target_); }; | |
| 30 | |
| 31 // // Should generate all three: optional + union of AddEventListenerOptions | |
| 32 // // and boolean. | |
| 33 // void AddEventListener(String type, EventListener* listener, | |
| 34 // 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
| |
| 35 // // EXCEPTION: Have to do this because options argument is a &ref. | |
| 36 // blink::AddEventListenerOptions blinkOptions = options->options(); | |
| 37 // event_target()->addEventListener(type, listener->listener(), blinkOptions ); | |
| 38 // } | |
| 39 | |
| 40 // void AddEventListener(String type, EventListener* listener, bool options) { | |
| 41 // event_target()->addEventListener(type, listener->listener(), options); | |
| 42 // } | |
| 43 | |
| 44 // void AddEventListener(String type, EventListener* listener) { | |
| 45 // event_target()->addEventListener(type, listener->listener()); | |
| 46 // } | |
| 47 | |
| 48 protected: | |
| 49 blink::EventTarget* event_target() const { return event_target_; } | |
| 50 | |
| 51 private: | |
| 52 blink::Member<blink::EventTarget> event_target_; | |
| 53 }; | |
| 54 | |
| 55 } // namespace api | |
| 56 } // namespace web | |
| 57 | |
| 58 #endif // WEB_API_NODE_H | |
| OLD | NEW |