Chromium Code Reviews| Index: third_party/WebKit/fake_gen/web/api/node.h |
| diff --git a/third_party/WebKit/fake_gen/web/api/node.h b/third_party/WebKit/fake_gen/web/api/node.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a0369d45e7b5300cdf85649d3e9261b6bb308761 |
| --- /dev/null |
| +++ b/third_party/WebKit/fake_gen/web/api/node.h |
| @@ -0,0 +1,46 @@ |
| +// 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_NODE_H |
| +#define WEB_API_NODE_H |
| + |
| +#include "core/dom/Node.h" |
| +#include "web/api/event_target.h" |
| + |
| +namespace web { |
| +namespace api { |
| + |
| +// TODO(dglazkov): Needs a forward-declare here to avoid declaration cycles. |
| +class Element; |
| + |
| +class Node : public EventTarget { |
| + public: |
| + explicit Node(blink::Node* node) : EventTarget(node) {} |
| + virtual ~Node() {} |
| + |
| + String GetNodeName() const { return node()->nodeName(); } |
| + |
| + // TODO(dglazkov): Will need .cc to compile this. |
|
dglazkov
2016/12/22 16:36:13
This sucks. I really had hope to avoid making sour
haraken
2016/12/23 15:16:42
Personally I'm okay with generating all methods in
|
| + // Element* GetParentElement() const { |
| + // return new Element(node()->parentElement()); |
| + // } |
| + |
| + protected: |
| + // toNode API is inconsistent with toElement, will probably need a whitelist |
| + // of exceptions in real codegen. |
| + blink::Node* node() const { return event_target()->toNode(); } |
| +}; |
| + |
| +} // namespace api |
| +} // namespace web |
| + |
| +#endif // WEB_API_NODE_H |