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

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: Changes Incorporated 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 | chrome/browser/android/accessibility/font_size_prefs_android.h » ('j') | 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 public void setForceEnableZoom(boolean enabled) { 165 public void setForceEnableZoom(boolean enabled) {
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() {
174 mSharedPreferences.unregisterOnSharedPreferenceChangeListener(this);
175 nativeDestroy(mFontSizePrefsAndroidPtr);
176 }
177
178 private native void nativeAddObserver(long nativeFontSizePrefsAndroid, 173 private native void nativeAddObserver(long nativeFontSizePrefsAndroid,
179 long nativeObserverPtr); 174 long nativeObserverPtr);
180 175
181 private native void nativeRemoveObserver(long nativeFontSizePrefsAndroid, 176 private native void nativeRemoveObserver(long nativeFontSizePrefsAndroid,
182 long nativeObserverPtr); 177 long nativeObserverPtr);
183 178
184 private native long nativeInit(); 179 private native long nativeInit();
185 180
186 private native void nativeDestroy(long nativeFontSizePrefsAndroid);
187
188 private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid , float font); 181 private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid , float font);
189 182
190 private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroi d); 183 private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroi d);
191 184
192 private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndr oid); 185 private native boolean nativeGetForceEnableZoom(long nativeFontSizePrefsAndr oid);
193 186
194 private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid , boolean enabled); 187 private native void nativeSetForceEnableZoom(long nativeFontSizePrefsAndroid , boolean enabled);
195 } 188 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/accessibility/font_size_prefs_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698