Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: Source/modules/screen_orientation/OrientationInformation.cpp

Issue 366853008: [screen-orientation] Expose orientation info in OrientationInformation interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 #include "config.h"
6 #include "modules/screen_orientation/OrientationInformation.h"
7
8 #include "modules/screen_orientation/ScreenOrientation.h"
9
10 namespace WebCore {
11
12 OrientationInformation::OrientationInformation()
13 : m_type(blink::WebScreenOrientationUndefined)
14 , m_angle(0)
15 {
16 ScriptWrappable::init(this);
17 }
18
19 bool OrientationInformation::initialized() const
20 {
21 return m_type != blink::WebScreenOrientationUndefined;
22 }
23
24 String OrientationInformation::type() const
25 {
26 return ScreenOrientation::orientationTypeToString(m_type);
27 }
28
29 unsigned short OrientationInformation::angle() const
30 {
31 return m_angle;
32 }
33
34 void OrientationInformation::setType(blink::WebScreenOrientationType type)
35 {
36 ASSERT(type != blink::WebScreenOrientationUndefined);
37 m_type = type;
38 }
39
40 void OrientationInformation::setAngle(unsigned short angle)
41 {
42 m_angle = angle;
43 }
44
45 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698