Chromium Code Reviews| Index: third_party/WebKit/fake_gen/web/api/element.h |
| diff --git a/third_party/WebKit/fake_gen/web/api/element.h b/third_party/WebKit/fake_gen/web/api/element.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..45b17df437e3b19357faf1f7102e2935f133c12d |
| --- /dev/null |
| +++ b/third_party/WebKit/fake_gen/web/api/element.h |
| @@ -0,0 +1,39 @@ |
| +// 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_ELEMENT_H |
| +#define WEB_API_ELEMENT_H |
| + |
| +#include "core/dom/Element.h" |
| +#include "web/api/Node.h" |
| + |
| +namespace web { |
| +namespace api { |
|
dglazkov
2016/12/22 16:36:13
Should this be just web::Element? I feel like I am
haraken
2016/12/23 15:16:42
Personally I'd prefer avoiding nested namespaces.
|
| + |
| +class Element : public Node { |
| + public: |
| + explicit Element(blink::Element* element) : Node(element) {} |
| + virtual ~Element() {} |
| + |
| + String GetLocalName() const { return element()->localName(); } |
| + |
| + String GetId() const { return element()->getIdAttribute(); } |
| + void SetId(AtomicString id) { element()->setIdAttribute(id); } |
|
dglazkov
2016/12/22 16:36:13
Here, the situation will get funky when the type t
dglazkov
2016/12/22 16:39:10
Correction from web::api::Type to blink::Type (the
dglazkov
2016/12/22 16:44:48
Correction: friendship is NOT known.
haraken
2016/12/23 15:16:42
Would it be an option to introduce a toBlinkType()
|
| + |
| + protected: |
| + blink::Element* element() const { return blink::toElement(node()); } |
| +}; |
| + |
| +} // namespace api |
| +} // namespace web |
| + |
| +#endif // WEB_API_ELEMENT_H |