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

Unified Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.h

Issue 444033002: Fix screen.orientation.lock() rejection and an integration test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 4 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: content/browser/screen_orientation/screen_orientation_dispatcher_host.h
diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
index 61d1938d6717d704ea2f9a3e57bb13aaccb053b5..3357b17ae04ca1921b7c7455499e28db02c092f2 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
@@ -31,7 +31,14 @@ class CONTENT_EXPORT ScreenOrientationDispatcherHost
virtual bool OnMessageReceived(const IPC::Message&,
RenderFrameHost* render_frame_host) OVERRIDE;
+ // Notifies that the lock with the given |request_id| has succeeded.
+ // The renderer process will be notified that the lock succeeded only if
+ // |request_id| matches the |current_lock_|.
void NotifyLockSuccess(int request_id);
+
+ // Notifies that the lock with the given |request_id| has failed.
+ // The renderer process will be notified that the lock succeeded only if
+ // |request_id| matches the |current_lock_|.
void NotifyLockError(int request_id, blink::WebLockOrientationError error);
void OnOrientationChange();
@@ -47,6 +54,9 @@ class CONTENT_EXPORT ScreenOrientationDispatcherHost
RenderFrameHost* GetRenderFrameHostForRequestID(int request_id);
void ResetCurrentLock();
+ void NotifyLockError(int request_id,
+ RenderFrameHost* render_frame_host,
+ blink::WebLockOrientationError error);
scoped_ptr<ScreenOrientationProvider> provider_;

Powered by Google App Engine
This is Rietveld 408576698