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

Side by Side 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 unified diff | Download patch
OLDNEW
(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 "platform/heap/Handle.h"
17 // TODO(dglazkov): How is this added?
18 #include "web/api/event.h"
19 // TODO(dglazkov): How is this added?
20 #include "wtf/Functional.h"
21
22 namespace blink {
23 class EventTarget;
24 class AddEventListenerOptions;
25 class EventListenerOptions;
26 }
27
28 namespace web {
29
30 class EventTarget : public blink::GarbageCollected<EventTarget> {
31 public:
32 virtual ~EventTarget() = default;
33
34 static EventTarget* Create(blink::EventTarget*);
35
36 DECLARE_TRACE();
37
38 // TODO(dglazkov): How is this generated
39 typedef Function<void(Event*)> EventListener;
40 // TODO(dglazkov): How is type an AtomicString?
41 // TODO(dglazkov): How is AddEventListenerOptions picked from union type?
42 // TOOD(dglazkov): How does AddEventListenerOptions stay blink::?
43 // TODO(dglazkov): How is the "optional" resulting in two functions?
44 void AddEventListener(const AtomicString& type,
45 std::unique_ptr<EventListener> listener);
46 void AddEventListener(const AtomicString& type,
47 std::unique_ptr<EventListener> listener,
48 const blink::AddEventListenerOptions& options);
49 void RemoveEventListeber(const AtomicString& type,
50 std::unique_ptr<EventListener> listener);
51 void RemoveEventListeber(const AtomicString& type,
52 std::unique_ptr<EventListener> listener,
53 const blink::EventListenerOptions& options);
54 bool DispatchEvent(Event*);
55
56 protected:
57 explicit EventTarget(blink::EventTarget* event_target);
58 blink::EventTarget* event_target() const;
59
60 private:
61 blink::Member<blink::EventTarget> event_target_;
62 };
63
64 } // namespace web
65
66 #endif // WEB_API_EVENT_TARGET_H
OLDNEW
« 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