Commit bcc26513 authored by mlamouri@chromium.org's avatar mlamouri@chromium.org

Cleanups in ScreenOrientationDispatcherHost.

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284786 0039d316-1c4b-4281-b951-d872f2087c98
parent c4a4dfb2
......@@ -102,16 +102,16 @@ void ScreenOrientationDispatcherHost::OnLockRequest(
blink::WebLockOrientationErrorCanceled);
}
current_lock_ = new LockInformation(request_id,
render_frame_host->GetProcess()->GetID(),
render_frame_host->GetRoutingID());
if (!provider_) {
NotifyLockError(request_id,
blink::WebLockOrientationErrorNotAvailable);
return;
}
current_lock_ = new LockInformation(request_id,
render_frame_host->GetProcess()->GetID(),
render_frame_host->GetRoutingID());
provider_->LockOrientation(request_id, orientation);
}
......@@ -122,7 +122,7 @@ void ScreenOrientationDispatcherHost::OnUnlockRequest(
blink::WebLockOrientationErrorCanceled);
}
if (!provider_.get())
if (!provider_)
return;
provider_->UnlockOrientation();
......
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