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

Unified Diff: third_party/WebKit/fake_gen/web/api/node.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/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

Powered by Google App Engine
This is Rietveld 408576698