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

Side by Side Diff: third_party/WebKit/fake_gen/web/api/node.cc

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 #include "web/api/node.h"
14
15 #include "core/dom/ChildNode.h"
16 #include "core/dom/Element.h"
17 #include "core/dom/Node.h"
18 #include "web/api/element.h"
19
20 namespace web {
21
22 Node::Node(blink::Node* node) : EventTarget(node) {}
23
24 Node* Node::Create(blink::Node* node) {
25 return node ? new Node(node) : nullptr;
26 }
27
28 String Node::GetNodeName() const {
29 return node()->nodeName();
30 }
31
32 Element* Node::GetParentElement() const {
33 return Element::Create(node()->parentElement());
34 }
35
36 blink::Node* Node::node() const {
37 // toNode API is inconsistent with toElement, will probably need a whitelist
38 // of exceptions in real codegen.
39 return event_target()->toNode();
40 }
41
42 blink::NodeOrString Node::CreateNodeOrString(String string) const {
43 return blink::NodeOrString::fromString(string);
44 }
45 blink::NodeOrString Node::CreateNodeOrString(Node* node) const {
46 return blink::NodeOrString::fromNode(node->node());
47 }
48
49 } // namespace web
OLDNEW
« no previous file with comments | « third_party/WebKit/fake_gen/web/api/node.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698