Android media: VideoFrame should not store so many sync points.
[chromium-blink-merge.git] / content / browser / screen_orientation / screen_orientation_provider.h
blobd3eccc4bb3e50e39a429b696a2851fd2b0525e6e
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_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_
8 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
10 namespace content {
12 class ScreenOrientationDispatcherHost;
13 class WebContents;
15 // Interface that needs to be implemented by any backend that wants to handle
16 // screen orientation lock/unlock.
17 class ScreenOrientationProvider {
18 public:
19 // Lock the screen orientation to |orientations|.
20 virtual void LockOrientation(
21 int request_id,
22 blink::WebScreenOrientationLockType orientations) = 0;
24 // Unlock the screen orientation.
25 virtual void UnlockOrientation() = 0;
27 // Inform about a screen orientation update. It is called to let the provider
28 // know if a lock has been resolved.
29 virtual void OnOrientationChange() = 0;
31 virtual ~ScreenOrientationProvider() {}
33 protected:
34 friend class ScreenOrientationDispatcherHost;
36 static ScreenOrientationProvider* Create(
37 ScreenOrientationDispatcherHost* dispatcher_host,
38 WebContents* web_contents);
40 ScreenOrientationProvider() {}
42 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
45 #if !defined(OS_ANDROID)
46 // static
47 ScreenOrientationProvider* ScreenOrientationProvider::Create(
48 ScreenOrientationDispatcherHost* dispatcher_host,
49 WebContents* web_contents) {
50 return NULL;
52 #endif // !defined(OS_ANDROID)
54 } // namespace content
56 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_