1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationError.h"
13 // ScreenOrientationDispatcherHost receives lock and unlock requests from the
14 // RenderFrames and dispatch them to the ScreenOrientationProvider. It also
15 // make sure that the right RenderFrame get replied for each lock request.
16 class CONTENT_EXPORT ScreenOrientationDispatcherHost
{
18 virtual ~ScreenOrientationDispatcherHost() {}
20 // Notifies that the lock with the given |request_id| has succeeded.
21 // The renderer process will be notified that the lock succeeded only if
22 // |request_id| matches the current lock information.
23 virtual void NotifyLockSuccess(int request_id
) = 0;
25 // Notifies that the lock with the given |request_id| has failed.
26 // The renderer process will be notified that the lock succeeded only if
27 // |request_id| matches the current lock information.
28 virtual void NotifyLockError(int request_id
,
29 blink::WebLockOrientationError error
) = 0;
31 virtual void OnOrientationChange() = 0;
34 } // namespace content
36 #endif // CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DISPATCHER_HOST_H_