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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 } | 130 } |
131 | 131 |
132 String ScreenOrientation::type() const { | 132 String ScreenOrientation::type() const { |
133 return orientationTypeToString(m_type); | 133 return orientationTypeToString(m_type); |
134 } | 134 } |
135 | 135 |
136 unsigned short ScreenOrientation::angle() const { | 136 unsigned short ScreenOrientation::angle() const { |
137 return m_angle; | 137 return m_angle; |
138 } | 138 } |
139 | 139 |
| 140 WebScreenOrientationType ScreenOrientation::getType() const { |
| 141 return m_type; |
| 142 } |
| 143 |
140 void ScreenOrientation::setType(WebScreenOrientationType type) { | 144 void ScreenOrientation::setType(WebScreenOrientationType type) { |
141 m_type = type; | 145 m_type = type; |
142 } | 146 } |
143 | 147 |
144 void ScreenOrientation::setAngle(unsigned short angle) { | 148 void ScreenOrientation::setAngle(unsigned short angle) { |
145 m_angle = angle; | 149 m_angle = angle; |
146 } | 150 } |
147 | 151 |
148 ScriptPromise ScreenOrientation::lock(ScriptState* state, | 152 ScriptPromise ScreenOrientation::lock(ScriptState* state, |
149 const AtomicString& lockString) { | 153 const AtomicString& lockString) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 190 |
187 return ScreenOrientationControllerImpl::from(*frame()); | 191 return ScreenOrientationControllerImpl::from(*frame()); |
188 } | 192 } |
189 | 193 |
190 DEFINE_TRACE(ScreenOrientation) { | 194 DEFINE_TRACE(ScreenOrientation) { |
191 EventTargetWithInlineData::trace(visitor); | 195 EventTargetWithInlineData::trace(visitor); |
192 ContextClient::trace(visitor); | 196 ContextClient::trace(visitor); |
193 } | 197 } |
194 | 198 |
195 } // namespace blink | 199 } // namespace blink |
OLD | NEW |