Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ELEMENT_H | |
| 14 #define WEB_API_ELEMENT_H | |
| 15 | |
| 16 #include "core/dom/Element.h" | |
| 17 #include "web/api/Node.h" | |
| 18 | |
| 19 namespace web { | |
| 20 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.
| |
| 21 | |
| 22 class Element : public Node { | |
| 23 public: | |
| 24 explicit Element(blink::Element* element) : Node(element) {} | |
| 25 virtual ~Element() {} | |
| 26 | |
| 27 String GetLocalName() const { return element()->localName(); } | |
| 28 | |
| 29 String GetId() const { return element()->getIdAttribute(); } | |
| 30 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()
| |
| 31 | |
| 32 protected: | |
| 33 blink::Element* element() const { return blink::toElement(node()); } | |
| 34 }; | |
| 35 | |
| 36 } // namespace api | |
| 37 } // namespace web | |
| 38 | |
| 39 #endif // WEB_API_ELEMENT_H | |
| OLD | NEW |