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

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

Issue 563743002: Remove FontSizePrefs destroy() method as its a singleton class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import android.content.SharedPreferences.OnSharedPreferenceChangeListener; 9 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
10 import android.preference.PreferenceManager; 10 import android.preference.PreferenceManager;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 nativeSetForceEnableZoom(mFontSizePrefsAndroidPtr, enabled); 166 nativeSetForceEnableZoom(mFontSizePrefsAndroidPtr, enabled);
167 } 167 }
168 168
169 public boolean getForceEnableZoom() { 169 public boolean getForceEnableZoom() {
170 return nativeGetForceEnableZoom(mFontSizePrefsAndroidPtr); 170 return nativeGetForceEnableZoom(mFontSizePrefsAndroidPtr);
171 } 171 }
172 172
173 public void destroy() { 173 public void destroy() {
174 mSharedPreferences.unregisterOnSharedPreferenceChangeListener(this); 174 mSharedPreferences.unregisterOnSharedPreferenceChangeListener(this);
175 nativeDestroy(mFontSizePrefsAndroidPtr); 175 nativeDestroy(mFontSizePrefsAndroidPtr);
176 mObserverMap.clear();
Ted C 2014/09/15 18:42:37 destroy seems like an odd API to have on a singlet
nyquist 2014/09/15 19:56:50 Yes, .clear() would be wrong. I think it would be
wajahat 2014/09/16 09:30:36 As this is a singleton class and there are no refe
wajahat 2014/09/16 09:30:36 Done.
176 } 177 }
177 178
178 private native void nativeAddObserver(long nativeFontSizePrefsAndroid, 179 private native void nativeAddObserver(long nativeFontSizePrefsAndroid,
179 long nativeObserverPtr); 180 long nativeObserverPtr);
180 181
181 private native void nativeRemoveObserver(long nativeFontSizePrefsAndroid, 182 private native void nativeRemoveObserver(long nativeFontSizePrefsAndroid,
182 long nativeObserverPtr); 183 long nativeObserverPtr);
183 184
184 private native long nativeInit(); 185 private native long nativeInit();
185 186
186 private native void nativeDestroy(long nativeFontSizePrefsAndroid); 187 private native void nativeDestroy(long nativeFontSizePrefsAndroid);
187 188
188 private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid , float font); 189 private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid , float font);
189 190
190 private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroi d); 191 private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroi d);
191 192
192 private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndr oid); 193 private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndr oid);
193 194
194 private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid , boolean enabled); 195 private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid , boolean enabled);
195 } 196 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698