Commit 1a794ff9 authored by mlamouri@chromium.org's avatar mlamouri@chromium.org

Cleanup Blink's Platform from Screen Orientation stuff.

The embedders should now use WebScreenOrientationClient instead.

BUG=None

Review URL: https://codereview.chromium.org/339343003

git-svn-id: svn://svn.chromium.org/blink/trunk@176462 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent bc808758
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "core/page/Page.h" #include "core/page/Page.h"
#include "platform/LayoutTestSupport.h" #include "platform/LayoutTestSupport.h"
#include "platform/PlatformScreen.h" #include "platform/PlatformScreen.h"
#include "public/platform/Platform.h"
#include "public/platform/WebScreenOrientationClient.h" #include "public/platform/WebScreenOrientationClient.h"
namespace WebCore { namespace WebCore {
...@@ -119,8 +118,6 @@ blink::WebScreenOrientationType ScreenOrientationController::orientation() const ...@@ -119,8 +118,6 @@ blink::WebScreenOrientationType ScreenOrientationController::orientation() const
void ScreenOrientationController::lockOrientation(blink::WebScreenOrientationLockType orientation, blink::WebLockOrientationCallback* callback) void ScreenOrientationController::lockOrientation(blink::WebScreenOrientationLockType orientation, blink::WebLockOrientationCallback* callback)
{ {
if (!m_client) { if (!m_client) {
// FIXME: temporary until the content layer gets updated.
blink::Platform::current()->lockOrientation(orientation, callback);
return; return;
} }
...@@ -130,8 +127,6 @@ void ScreenOrientationController::lockOrientation(blink::WebScreenOrientationLoc ...@@ -130,8 +127,6 @@ void ScreenOrientationController::lockOrientation(blink::WebScreenOrientationLoc
void ScreenOrientationController::unlockOrientation() void ScreenOrientationController::unlockOrientation()
{ {
if (!m_client) { if (!m_client) {
// FIXME: temporary until the content layer gets updated.
blink::Platform::current()->unlockOrientation();
return; return;
} }
......
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
#include "WebGraphicsContext3D.h" #include "WebGraphicsContext3D.h"
#include "WebLocalizedString.h" #include "WebLocalizedString.h"
#include "WebLockOrientationCallback.h" #include "WebLockOrientationCallback.h"
#include "WebScreenOrientationLockType.h"
#include "WebScreenOrientationType.h"
#include "WebSpeechSynthesizer.h" #include "WebSpeechSynthesizer.h"
#include "WebStorageQuotaCallbacks.h" #include "WebStorageQuotaCallbacks.h"
#include "WebStorageQuotaType.h" #include "WebStorageQuotaType.h"
...@@ -91,7 +89,6 @@ class WebPublicSuffixList; ...@@ -91,7 +89,6 @@ class WebPublicSuffixList;
class WebRTCPeerConnectionHandler; class WebRTCPeerConnectionHandler;
class WebRTCPeerConnectionHandlerClient; class WebRTCPeerConnectionHandlerClient;
class WebSandboxSupport; class WebSandboxSupport;
class WebScreenOrientationListener;
class WebScrollbarBehavior; class WebScrollbarBehavior;
class WebSocketHandle; class WebSocketHandle;
class WebSocketStreamHandle; class WebSocketStreamHandle;
...@@ -632,24 +629,6 @@ public: ...@@ -632,24 +629,6 @@ public:
virtual void setDeviceLightListener(blink::WebDeviceLightListener*) { } virtual void setDeviceLightListener(blink::WebDeviceLightListener*) { }
// Screen Orientation -------------------------------------------------
// FIXME: this is meant to be removed when the content layer will be updated.
virtual void lockOrientation(WebScreenOrientationLockType) { }
// Request a screen orientation lock and pass a |callback| object to be used
// to notify of success/failure. The |callback| parameter is expected to be
// owned by the implementation.
virtual void lockOrientation(WebScreenOrientationLockType orientation, WebLockOrientationCallback* callback)
{
// FIXME: remove this when
// lockOrientation(orientation, callback) will be handled in Chromium.
lockOrientation(orientation);
delete callback; // prevents memory leak if there is no implementation.
}
virtual void unlockOrientation() { }
// Quota ----------------------------------------------------------- // Quota -----------------------------------------------------------
// Queries the storage partition's storage usage and quota information. // Queries the storage partition's storage usage and quota information.
......
// 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.
#ifndef WebScreenOrientationListener_h
#define WebScreenOrientationListener_h
#include "WebScreenOrientationType.h"
namespace blink {
class WebScreenOrientationListener {
public:
virtual ~WebScreenOrientationListener() { }
// This method is called every time the screen orientation changes.
virtual void didChangeScreenOrientation(WebScreenOrientationType) = 0;
};
} // namespace blink
#endif // WebScreenOrientationListener_h
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment