| 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 "public/platform/WebString.h" | 9 #include "public/platform/WebString.h" |
| 10 #include "wtf/PassRefPtr.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 { | 15 { |
| 16 return String(constUnwrap<HTMLMetaElement>()->computeEncoding().name()); | 16 return String(constUnwrap<HTMLMetaElement>()->computeEncoding().name()); |
| 17 } | 17 } |
| 18 | 18 |
| 19 WebMetaElement::WebMetaElement(const PassRefPtrWillBeRawPtr<HTMLMetaElement>& el
ement) | 19 WebMetaElement::WebMetaElement(const RawPtr<HTMLMetaElement>& element) |
| 20 : WebElement(element) | 20 : WebElement(element) |
| 21 { | 21 { |
| 22 } | 22 } |
| 23 | 23 |
| 24 DEFINE_WEB_NODE_TYPE_CASTS(WebMetaElement, isHTMLMetaElement(constUnwrap<Node>()
)); | 24 DEFINE_WEB_NODE_TYPE_CASTS(WebMetaElement, isHTMLMetaElement(constUnwrap<Node>()
)); |
| 25 | 25 |
| 26 WebMetaElement& WebMetaElement::operator=(const PassRefPtrWillBeRawPtr<HTMLMetaE
lement>& element) | 26 WebMetaElement& WebMetaElement::operator=(const RawPtr<HTMLMetaElement>& element
) |
| 27 { | 27 { |
| 28 m_private = element; | 28 m_private = element; |
| 29 return *this; | 29 return *this; |
| 30 } | 30 } |
| 31 | 31 |
| 32 WebMetaElement::operator PassRefPtrWillBeRawPtr<HTMLMetaElement>() const | 32 WebMetaElement::operator RawPtr<HTMLMetaElement>() const |
| 33 { | 33 { |
| 34 return toHTMLMetaElement(m_private.get()); | 34 return toHTMLMetaElement(m_private.get()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace blink | 37 } // namespace blink |
| OLD | NEW |