| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "modules/screen_orientation/ScreenOrientation.h" | 5 #include "modules/screen_orientation/ScreenOrientation.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromise.h" | 7 #include "bindings/core/v8/ScriptPromise.h" |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | 8 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 ScreenOrientation::~ScreenOrientation() | 117 ScreenOrientation::~ScreenOrientation() |
| 118 { | 118 { |
| 119 } | 119 } |
| 120 | 120 |
| 121 const WTF::AtomicString& ScreenOrientation::interfaceName() const | 121 const WTF::AtomicString& ScreenOrientation::interfaceName() const |
| 122 { | 122 { |
| 123 return EventTargetNames::ScreenOrientation; | 123 return EventTargetNames::ScreenOrientation; |
| 124 } | 124 } |
| 125 | 125 |
| 126 ExecutionContext* ScreenOrientation::executionContext() const | 126 ExecutionContext* ScreenOrientation::getExecutionContext() const |
| 127 { | 127 { |
| 128 if (!m_frame) | 128 if (!m_frame) |
| 129 return 0; | 129 return 0; |
| 130 return m_frame->document(); | 130 return m_frame->document(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 String ScreenOrientation::type() const | 133 String ScreenOrientation::type() const |
| 134 { | 134 { |
| 135 return orientationTypeToString(m_type); | 135 return orientationTypeToString(m_type); |
| 136 } | 136 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 return ScreenOrientationController::from(*m_frame); | 189 return ScreenOrientationController::from(*m_frame); |
| 190 } | 190 } |
| 191 | 191 |
| 192 DEFINE_TRACE(ScreenOrientation) | 192 DEFINE_TRACE(ScreenOrientation) |
| 193 { | 193 { |
| 194 RefCountedGarbageCollectedEventTargetWithInlineData<ScreenOrientation>::trac
e(visitor); | 194 RefCountedGarbageCollectedEventTargetWithInlineData<ScreenOrientation>::trac
e(visitor); |
| 195 DOMWindowProperty::trace(visitor); | 195 DOMWindowProperty::trace(visitor); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace blink | 198 } // namespace blink |
| OLD | NEW |