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

Unified Diff: Source/modules/screen_orientation/ScreenOrientation.cpp

Issue 366853008: [screen-orientation] Expose orientation info in OrientationInformation interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update ctor listing Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/screen_orientation/ScreenOrientation.cpp
diff --git a/Source/modules/screen_orientation/ScreenOrientation.cpp b/Source/modules/screen_orientation/ScreenOrientation.cpp
index 8114c51173ea3ec852d08703d41b2dfd5692afb9..356344e4c36176ca4a1413c3dfd667ac09ea4f7b 100644
--- a/Source/modules/screen_orientation/ScreenOrientation.cpp
+++ b/Source/modules/screen_orientation/ScreenOrientation.cpp
@@ -116,15 +116,13 @@ ScreenOrientation::~ScreenOrientation()
{
}
-const AtomicString& ScreenOrientation::orientation(Screen& screen)
+OrientationInformation* ScreenOrientation::orientation(Screen& screen)
{
ScreenOrientation& screenOrientation = ScreenOrientation::from(screen);
if (!screenOrientation.frame()) {
- // FIXME: we should try to return a better guess, like the latest known value.
- return orientationTypeToString(blink::WebScreenOrientationPortraitPrimary);
+ return 0;
}
- ScreenOrientationController& controller = ScreenOrientationController::from(*screenOrientation.frame());
- return orientationTypeToString(controller.orientation());
+ return ScreenOrientationController::from(*screenOrientation.frame()).orientation();
}
ScriptPromise ScreenOrientation::lockOrientation(ScriptState* state, Screen& screen, const AtomicString& lockString)
« no previous file with comments | « Source/modules/screen_orientation/ScreenOrientation.h ('k') | Source/modules/screen_orientation/ScreenOrientation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698