| Index: third_party/WebKit/Source/web/WebViewImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| index 218f70fe9f3dfa61695497b476055adf4a9d0b69..9d99d9996897093dda54b5170f981ce6b19a3b95 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -139,6 +139,7 @@
|
| #include "public/web/WebElement.h"
|
| #include "public/web/WebFrame.h"
|
| #include "public/web/WebFrameClient.h"
|
| +#include "public/web/WebFrameWidget.h"
|
| #include "public/web/WebHitTestResult.h"
|
| #include "public/web/WebInputElement.h"
|
| #include "public/web/WebMeaningfulLayout.h"
|
| @@ -4436,18 +4437,30 @@ void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
|
|
|
| bool WebViewImpl::requestPointerLock()
|
| {
|
| - return m_client && m_client->requestPointerLock();
|
| + if (WebFrameWidget* widget = mainFrameImpl()->frameWidget()) {
|
| + if (WebWidgetClient* client = widget->client())
|
| + return client->requestPointerLock();
|
| + }
|
| +
|
| + return false;
|
| }
|
|
|
| void WebViewImpl::requestPointerUnlock()
|
| {
|
| - if (m_client)
|
| - m_client->requestPointerUnlock();
|
| + if (WebFrameWidget* widget = mainFrameImpl()->frameWidget()) {
|
| + if (WebWidgetClient* client = widget->client())
|
| + client->requestPointerUnlock();
|
| + }
|
| }
|
|
|
| bool WebViewImpl::isPointerLocked()
|
| {
|
| - return m_client && m_client->isPointerLocked();
|
| + if (WebFrameWidget* widget = mainFrameImpl()->frameWidget()) {
|
| + if (WebWidgetClient* client = widget->client())
|
| + return client->isPointerLocked();
|
| + }
|
| +
|
| + return false;
|
| }
|
|
|
| void WebViewImpl::pointerLockMouseEvent(const WebInputEvent& event)
|
|
|