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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java

Issue 410173002: Make ScreenOrientationProvider (Java) a bag of static methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java b/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java
index 0aebd440be7f94c00ac5d624307939903a1b2f66..53c8c0f8452708e6dfdb5782150122153bc9d442 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ScreenOrientationProvider.java
@@ -9,8 +9,6 @@ import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.util.Log;
-import com.google.common.annotations.VisibleForTesting;
-
import org.chromium.base.ApplicationStatus;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
@@ -23,7 +21,7 @@ import org.chromium.content.common.ScreenOrientationValues;
class ScreenOrientationProvider {
private static final String TAG = "ScreenOrientationProvider";
- private int getOrientationFromWebScreenOrientations(byte orientations) {
+ private static int getOrientationFromWebScreenOrientations(byte orientations) {
switch (orientations) {
case ScreenOrientationValues.DEFAULT:
return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
@@ -47,14 +45,8 @@ class ScreenOrientationProvider {
}
}
- @VisibleForTesting
- @CalledByNative
- static ScreenOrientationProvider create() {
- return new ScreenOrientationProvider();
- }
-
@CalledByNative
- void lockOrientation(byte orientations) {
+ static void lockOrientation(byte orientations) {
Activity activity = ApplicationStatus.getLastTrackedFocusedActivity();
if (activity == null) {
return;
@@ -69,7 +61,7 @@ class ScreenOrientationProvider {
}
@CalledByNative
- void unlockOrientation() {
+ static void unlockOrientation() {
Activity activity = ApplicationStatus.getLastTrackedFocusedActivity();
if (activity == null) {
return;

Powered by Google App Engine
This is Rietveld 408576698