Index: Source/web/WebScreenOrientationController.cpp |
diff --git a/Source/web/WebScreenOrientationController.cpp b/Source/web/WebScreenOrientationController.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6ffa0775db7242429e4d4c4501a5c3b814092bd7 |
--- /dev/null |
+++ b/Source/web/WebScreenOrientationController.cpp |
@@ -0,0 +1,23 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+#include "WebScreenOrientationController.h" |
+ |
+#include "modules/screen_orientation/ScreenOrientationController.h" |
+ |
+namespace blink { |
+ |
+// Make sure WebScreenOrientation stays in sync with WebCore::ScreenOrientationValue. |
+COMPILE_ASSERT(WebScreenOrientationPortraitPrimary == static_cast<WebScreenOrientation>(WebCore::OrientationPortraitPrimary), WebScreenOrientationPortraitPrimary_Is_Wrong_Should_Be_OrientationPortraitPrimary); |
+COMPILE_ASSERT(WebScreenOrientationLandscapePrimary == static_cast<WebScreenOrientation>(WebCore::OrientationLandscapePrimary), WebScreenOrientationLandscapePrimary_Is_Wrong_Should_Be_OrientationLandscapePrimary); |
+COMPILE_ASSERT(WebScreenOrientationPortraitSecondary == static_cast<WebScreenOrientation>(WebCore::OrientationPortraitSecondary), WebScreenOrientationPortraitSecondary_Is_Wrong_Should_Be_OrientationPortraitSecondary); |
+COMPILE_ASSERT(WebScreenOrientationLandscapeSecondary == static_cast<WebScreenOrientation>(WebCore::OrientationLandscapeSecondary), WebScreenOrientationLandscapeSecondary_Is_Wrong_Should_Be_OrientationLandscapeSecondary); |
Peter Beverloo
2014/02/13 16:33:42
This is more verbose than I hoped it'd be.. I reca
Inactive
2014/02/13 17:03:24
This is the pattern I found in other files in Blin
Inactive
2014/02/13 17:06:38
Oh, I have just found:
Source/web/AssertMatchingEn
Inactive
2014/02/13 17:12:31
Done.
|
+ |
+void WebScreenOrientationController::orientationChanged(WebScreenOrientation orientation) |
+{ |
+ m_private->orientationChanged(static_cast<WebCore::ScreenOrientationValue>(orientation)); |
+} |
+ |
+} // namespace blink |