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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.accessibility; 5 package org.chromium.chrome.browser.accessibility;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 9
10 import org.chromium.base.ContextUtils; 10 import org.chromium.base.ContextUtils;
(...skipping 27 matching lines...) Expand all
38 static final String PREF_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable _zoom"; 38 static final String PREF_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable _zoom";
39 static final String PREF_USER_FONT_SCALE_FACTOR = "user_font_scale_factor"; 39 static final String PREF_USER_FONT_SCALE_FACTOR = "user_font_scale_factor";
40 40
41 private static FontSizePrefs sFontSizePrefs; 41 private static FontSizePrefs sFontSizePrefs;
42 42
43 private final long mFontSizePrefsAndroidPtr; 43 private final long mFontSizePrefsAndroidPtr;
44 private final Context mApplicationContext; 44 private final Context mApplicationContext;
45 private final SharedPreferences mSharedPreferences; 45 private final SharedPreferences mSharedPreferences;
46 private final ObserverList<FontSizePrefsObserver> mObserverList; 46 private final ObserverList<FontSizePrefsObserver> mObserverList;
47 47
48 private Float mSystemFontScaleForTests = null; 48 private Float mSystemFontScaleForTests;
49 49
50 /** 50 /**
51 * Interface for observing changes in font size-related preferences. 51 * Interface for observing changes in font size-related preferences.
52 */ 52 */
53 public interface FontSizePrefsObserver { 53 public interface FontSizePrefsObserver {
54 void onFontScaleFactorChanged(float fontScaleFactor, float userFontScale Factor); 54 void onFontScaleFactorChanged(float fontScaleFactor, float userFontScale Factor);
55 void onForceEnableZoomChanged(boolean enabled); 55 void onForceEnableZoomChanged(boolean enabled);
56 } 56 }
57 57
58 private FontSizePrefs(Context context) { 58 private FontSizePrefs(Context context) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 } 217 }
218 218
219 private native long nativeInit(); 219 private native long nativeInit();
220 private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid , 220 private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid ,
221 float fontScaleFactor); 221 float fontScaleFactor);
222 private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroi d); 222 private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroi d);
223 private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndr oid); 223 private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndr oid);
224 private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid , boolean enabled); 224 private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid , boolean enabled);
225 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698