| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "public/web/WebMetaElement.h" | 5 #include "public/web/WebMetaElement.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/html/HTMLMetaElement.h" | 8 #include "core/html/HTMLMetaElement.h" |
| 9 #include "platform/wtf/PassRefPtr.h" |
| 9 #include "public/platform/WebString.h" | 10 #include "public/platform/WebString.h" |
| 10 #include "wtf/PassRefPtr.h" | |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 WebString WebMetaElement::computeEncoding() const { | 14 WebString WebMetaElement::computeEncoding() const { |
| 15 return String(constUnwrap<HTMLMetaElement>()->computeEncoding().name()); | 15 return String(constUnwrap<HTMLMetaElement>()->computeEncoding().name()); |
| 16 } | 16 } |
| 17 | 17 |
| 18 WebMetaElement::WebMetaElement(HTMLMetaElement* element) | 18 WebMetaElement::WebMetaElement(HTMLMetaElement* element) |
| 19 : WebElement(element) {} | 19 : WebElement(element) {} |
| 20 | 20 |
| 21 DEFINE_WEB_NODE_TYPE_CASTS(WebMetaElement, | 21 DEFINE_WEB_NODE_TYPE_CASTS(WebMetaElement, |
| 22 isHTMLMetaElement(constUnwrap<Node>())); | 22 isHTMLMetaElement(constUnwrap<Node>())); |
| 23 | 23 |
| 24 WebMetaElement& WebMetaElement::operator=(HTMLMetaElement* element) { | 24 WebMetaElement& WebMetaElement::operator=(HTMLMetaElement* element) { |
| 25 m_private = element; | 25 m_private = element; |
| 26 return *this; | 26 return *this; |
| 27 } | 27 } |
| 28 | 28 |
| 29 WebMetaElement::operator HTMLMetaElement*() const { | 29 WebMetaElement::operator HTMLMetaElement*() const { |
| 30 return toHTMLMetaElement(m_private.get()); | 30 return toHTMLMetaElement(m_private.get()); |
| 31 } | 31 } |
| 32 | 32 |
| 33 } // namespace blink | 33 } // namespace blink |
| OLD | NEW |