OLD | NEW |
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.preferences; | 5 package org.chromium.chrome.browser.preferences; |
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.util.Log; | 9 import android.util.Log; |
10 | 10 |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 } | 399 } |
400 | 400 |
401 /** | 401 /** |
402 * Sets the preference that controls translate | 402 * Sets the preference that controls translate |
403 */ | 403 */ |
404 public void setTranslateEnabled(boolean enabled) { | 404 public void setTranslateEnabled(boolean enabled) { |
405 nativeSetTranslateEnabled(enabled); | 405 nativeSetTranslateEnabled(enabled); |
406 } | 406 } |
407 | 407 |
408 /** | 408 /** |
409 * Sets the preference that controls automatic detection of character encodi
ng. | |
410 */ | |
411 public void setAutoDetectEncodingEnabled(boolean enabled) { | |
412 nativeSetAutoDetectEncodingEnabled(enabled); | |
413 } | |
414 | |
415 /** | |
416 * Sets the preference that signals when the user has accepted the EULA. | 409 * Sets the preference that signals when the user has accepted the EULA. |
417 */ | 410 */ |
418 public void setEulaAccepted() { | 411 public void setEulaAccepted() { |
419 nativeSetEulaAccepted(); | 412 nativeSetEulaAccepted(); |
420 } | 413 } |
421 | 414 |
422 /** | 415 /** |
423 * Resets translate defaults if needed | 416 * Resets translate defaults if needed |
424 */ | 417 */ |
425 public void resetTranslateDefaults() { | 418 public void resetTranslateDefaults() { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 } | 690 } |
698 | 691 |
699 /** | 692 /** |
700 * @return whether translate is configured by policy | 693 * @return whether translate is configured by policy |
701 */ | 694 */ |
702 public boolean isTranslateManaged() { | 695 public boolean isTranslateManaged() { |
703 return nativeGetTranslateManaged(); | 696 return nativeGetTranslateManaged(); |
704 } | 697 } |
705 | 698 |
706 /** | 699 /** |
707 * @return true if automatic detection of character encoding is enabled, fal
se otherwise. | |
708 */ | |
709 public boolean isAutoDetectEncodingEnabled() { | |
710 return nativeGetAutoDetectEncodingEnabled(); | |
711 } | |
712 | |
713 /** | |
714 * Sets whether the web service to resolve navigation error should be enable
d. | 700 * Sets whether the web service to resolve navigation error should be enable
d. |
715 */ | 701 */ |
716 public void setResolveNavigationErrorEnabled(boolean enabled) { | 702 public void setResolveNavigationErrorEnabled(boolean enabled) { |
717 nativeSetResolveNavigationErrorEnabled(enabled); | 703 nativeSetResolveNavigationErrorEnabled(enabled); |
718 } | 704 } |
719 | 705 |
720 /** | 706 /** |
721 * Checks the state of deletion preference for a certain browsing data type. | 707 * Checks the state of deletion preference for a certain browsing data type. |
722 * @param dataType The requested browsing data type (from the shared enum | 708 * @param dataType The requested browsing data type (from the shared enum |
723 * {@link org.chromium.chrome.browser.BrowsingDataType}). | 709 * {@link org.chromium.chrome.browser.BrowsingDataType}). |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 private native boolean nativeGetCameraUserModifiable(); | 1123 private native boolean nativeGetCameraUserModifiable(); |
1138 private native boolean nativeGetCameraManagedByCustodian(); | 1124 private native boolean nativeGetCameraManagedByCustodian(); |
1139 private native boolean nativeGetMicEnabled(); | 1125 private native boolean nativeGetMicEnabled(); |
1140 private native void nativeSetMicEnabled(boolean allow); | 1126 private native void nativeSetMicEnabled(boolean allow); |
1141 private native boolean nativeGetMicUserModifiable(); | 1127 private native boolean nativeGetMicUserModifiable(); |
1142 private native boolean nativeGetMicManagedByCustodian(); | 1128 private native boolean nativeGetMicManagedByCustodian(); |
1143 private native boolean nativeGetFullscreenAllowed(); | 1129 private native boolean nativeGetFullscreenAllowed(); |
1144 private native boolean nativeGetFullscreenManaged(); | 1130 private native boolean nativeGetFullscreenManaged(); |
1145 private native boolean nativeGetTranslateEnabled(); | 1131 private native boolean nativeGetTranslateEnabled(); |
1146 private native boolean nativeGetTranslateManaged(); | 1132 private native boolean nativeGetTranslateManaged(); |
1147 private native boolean nativeGetAutoDetectEncodingEnabled(); | |
1148 private native boolean nativeGetResolveNavigationErrorEnabled(); | 1133 private native boolean nativeGetResolveNavigationErrorEnabled(); |
1149 private native boolean nativeGetResolveNavigationErrorManaged(); | 1134 private native boolean nativeGetResolveNavigationErrorManaged(); |
1150 private native boolean nativeGetProtectedMediaIdentifierEnabled(); | 1135 private native boolean nativeGetProtectedMediaIdentifierEnabled(); |
1151 private native boolean nativeGetCrashReportManaged(); | 1136 private native boolean nativeGetCrashReportManaged(); |
1152 private native boolean nativeGetIncognitoModeEnabled(); | 1137 private native boolean nativeGetIncognitoModeEnabled(); |
1153 private native boolean nativeGetIncognitoModeManaged(); | 1138 private native boolean nativeGetIncognitoModeManaged(); |
1154 private native boolean nativeGetPrintingEnabled(); | 1139 private native boolean nativeGetPrintingEnabled(); |
1155 private native boolean nativeGetPrintingManaged(); | 1140 private native boolean nativeGetPrintingManaged(); |
1156 private native boolean nativeGetSupervisedUserSafeSitesEnabled(); | 1141 private native boolean nativeGetSupervisedUserSafeSitesEnabled(); |
1157 private native void nativeSetTranslateEnabled(boolean enabled); | 1142 private native void nativeSetTranslateEnabled(boolean enabled); |
1158 private native void nativeSetAutoDetectEncodingEnabled(boolean enabled); | |
1159 private native void nativeResetTranslateDefaults(); | 1143 private native void nativeResetTranslateDefaults(); |
1160 private native void nativeMigrateJavascriptPreference(); | 1144 private native void nativeMigrateJavascriptPreference(); |
1161 private native boolean nativeGetBrowsingDataDeletionPreference(int dataType)
; | 1145 private native boolean nativeGetBrowsingDataDeletionPreference(int dataType)
; |
1162 private native void nativeSetBrowsingDataDeletionPreference(int dataType, bo
olean value); | 1146 private native void nativeSetBrowsingDataDeletionPreference(int dataType, bo
olean value); |
1163 private native int nativeGetBrowsingDataDeletionTimePeriod(); | 1147 private native int nativeGetBrowsingDataDeletionTimePeriod(); |
1164 private native void nativeSetBrowsingDataDeletionTimePeriod(int timePeriod); | 1148 private native void nativeSetBrowsingDataDeletionTimePeriod(int timePeriod); |
1165 private native void nativeClearBrowsingData( | 1149 private native void nativeClearBrowsingData( |
1166 int[] dataTypes, int timePeriod, String[] blacklistDomains); | 1150 int[] dataTypes, int timePeriod, String[] blacklistDomains); |
1167 private native void nativeRequestInfoAboutOtherFormsOfBrowsingHistory( | 1151 private native void nativeRequestInfoAboutOtherFormsOfBrowsingHistory( |
1168 OtherFormsOfBrowsingHistoryListener listener); | 1152 OtherFormsOfBrowsingHistoryListener listener); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL(
); | 1206 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL(
); |
1223 private native boolean nativeGetMetricsReportingEnabled(); | 1207 private native boolean nativeGetMetricsReportingEnabled(); |
1224 private native void nativeSetMetricsReportingEnabled(boolean enabled); | 1208 private native void nativeSetMetricsReportingEnabled(boolean enabled); |
1225 private native boolean nativeHasSetMetricsReporting(); | 1209 private native boolean nativeHasSetMetricsReporting(); |
1226 private native void nativeSetClickedUpdateMenuItem(boolean clicked); | 1210 private native void nativeSetClickedUpdateMenuItem(boolean clicked); |
1227 private native boolean nativeGetClickedUpdateMenuItem(); | 1211 private native boolean nativeGetClickedUpdateMenuItem(); |
1228 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v
ersion); | 1212 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v
ersion); |
1229 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem(); | 1213 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem(); |
1230 private native void nativeSetSupervisedUserId(String supervisedUserId); | 1214 private native void nativeSetSupervisedUserId(String supervisedUserId); |
1231 } | 1215 } |
OLD | NEW |