Apply _RELATIVE relocations ahead of others.
[chromium-blink-merge.git] / content / browser / screen_orientation / screen_orientation_delegate_android.h
blobfa3ee6e22113f834c7d30344f88889052c5643c1
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_DELEGATE_H_
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_H_
8 #include <jni.h>
10 #include "base/macros.h"
11 #include "content/public/browser/screen_orientation_delegate.h"
12 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
14 namespace content {
16 class WebContents;
18 // Android implementation of ScreenOrientationDelegate. The functionality of
19 // ScreenOrientationProvider is always supported.
20 class ScreenOrientationDelegateAndroid : public ScreenOrientationDelegate {
21 public:
22 ScreenOrientationDelegateAndroid();
23 virtual ~ScreenOrientationDelegateAndroid();
25 static bool Register(JNIEnv* env);
27 // Ask the ScreenOrientationListener (Java) to start accurately listening to
28 // the screen orientation. It keep track of the number of start request if it
29 // is already running an accurate listening.
30 static void StartAccurateListening();
32 // Ask the ScreenOrientationListener (Java) to stop accurately listening to
33 // the screen orientation. It will actually stop only if the number of stop
34 // requests matches the number of start requests.
35 static void StopAccurateListening();
37 // ScreenOrientationDelegate:
38 virtual bool FullScreenRequired(WebContents* web_contents) override;
39 virtual void Lock(
40 blink::WebScreenOrientationLockType lock_orientation) override;
41 virtual bool ScreenOrientationProviderSupported() override;
42 virtual void Unlock() override;
44 private:
45 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDelegateAndroid);
48 } // namespace content
50 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DELEGATE_H_