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_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DELEGATE_H_
8 #include "base/macros.h"
9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
16 // Can be implemented to provide platform specific functionality for
17 // ScreenOrientationProvider.
18 class CONTENT_EXPORT ScreenOrientationDelegate {
20 ScreenOrientationDelegate() {};
21 virtual ~ScreenOrientationDelegate() {}
23 // Returns true if the tab must be fullscreen in order for
24 // ScreenOrientationProvider to respond to requests.
25 virtual bool FullScreenRequired(WebContents* web_contents) = 0;
27 // Lock display to the given orientation.
28 virtual void Lock(blink::WebScreenOrientationLockType lock_orientation) = 0;
30 // Are ScreenOrientationProvider requests currently supported by the platform.
31 virtual bool ScreenOrientationProviderSupported() = 0;
33 // Unlocks the display, allowing hardware rotation to resume.
34 virtual void Unlock() = 0;
37 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDelegate);
40 } // namespace content
42 #endif // CONTENT_PUBLIC_BROWSER_SCREEN_ORIENTATION_DELEGATE_H_