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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java

Issue 2039953002: Add a preference for disabling vibration in notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Address Dan's comments. Created 4 years, 6 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
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.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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 306 }
307 307
308 /** 308 /**
309 * @return whether notifications are enabled. 309 * @return whether notifications are enabled.
310 */ 310 */
311 public boolean isNotificationsEnabled() { 311 public boolean isNotificationsEnabled() {
312 return nativeGetNotificationsEnabled(); 312 return nativeGetNotificationsEnabled();
313 } 313 }
314 314
315 /** 315 /**
316 * @return whether vibration is enabled for notifications.
317 */
318 public boolean isNotificationsVibrateEnabled() {
319 return nativeGetNotificationsVibrateEnabled();
320 }
321
322 /**
316 * @return whether geolocation information can be shared with content. 323 * @return whether geolocation information can be shared with content.
317 */ 324 */
318 public boolean isAllowLocationEnabled() { 325 public boolean isAllowLocationEnabled() {
319 return nativeGetAllowLocationEnabled(); 326 return nativeGetAllowLocationEnabled();
320 } 327 }
321 328
322 /** 329 /**
323 * @return whether geolocation information access is set to be shared with a ll sites, by policy. 330 * @return whether geolocation information access is set to be shared with a ll sites, by policy.
324 */ 331 */
325 public boolean isLocationAllowedByPolicy() { 332 public boolean isLocationAllowedByPolicy() {
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 } 853 }
847 854
848 public void setPasswordManagerAutoSigninEnabled(boolean enabled) { 855 public void setPasswordManagerAutoSigninEnabled(boolean enabled) {
849 nativeSetPasswordManagerAutoSigninEnabled(enabled); 856 nativeSetPasswordManagerAutoSigninEnabled(enabled);
850 } 857 }
851 858
852 public void setNotificationsEnabled(boolean allow) { 859 public void setNotificationsEnabled(boolean allow) {
853 nativeSetNotificationsEnabled(allow); 860 nativeSetNotificationsEnabled(allow);
854 } 861 }
855 862
863 public void setNotificationsVibrateEnabled(boolean enabled) {
864 nativeSetNotificationsVibrateEnabled(enabled);
865 }
866
856 public void setAllowLocationEnabled(boolean allow) { 867 public void setAllowLocationEnabled(boolean allow) {
857 nativeSetAllowLocationEnabled(allow); 868 nativeSetAllowLocationEnabled(allow);
858 } 869 }
859 870
860 public void setPasswordEchoEnabled(boolean enabled) { 871 public void setPasswordEchoEnabled(boolean enabled) {
861 nativeSetPasswordEchoEnabled(enabled); 872 nativeSetPasswordEchoEnabled(enabled);
862 } 873 }
863 874
864 /** 875 /**
865 * @return The setting if popups are enabled 876 * @return The setting if popups are enabled
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 private native void nativeSetAllowCookiesEnabled(boolean allow); 1162 private native void nativeSetAllowCookiesEnabled(boolean allow);
1152 private native void nativeSetBackgroundSyncEnabled(boolean allow); 1163 private native void nativeSetBackgroundSyncEnabled(boolean allow);
1153 private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled); 1164 private native void nativeSetBlockThirdPartyCookiesEnabled(boolean enabled);
1154 private native void nativeSetDoNotTrackEnabled(boolean enabled); 1165 private native void nativeSetDoNotTrackEnabled(boolean enabled);
1155 private native void nativeSetFullscreenAllowed(boolean allowed); 1166 private native void nativeSetFullscreenAllowed(boolean allowed);
1156 private native void nativeSetRememberPasswordsEnabled(boolean allow); 1167 private native void nativeSetRememberPasswordsEnabled(boolean allow);
1157 private native void nativeSetPasswordManagerAutoSigninEnabled(boolean enable d); 1168 private native void nativeSetPasswordManagerAutoSigninEnabled(boolean enable d);
1158 private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled ); 1169 private native void nativeSetProtectedMediaIdentifierEnabled(boolean enabled );
1159 private native boolean nativeGetAllowLocationEnabled(); 1170 private native boolean nativeGetAllowLocationEnabled();
1160 private native boolean nativeGetNotificationsEnabled(); 1171 private native boolean nativeGetNotificationsEnabled();
1172 private native boolean nativeGetNotificationsVibrateEnabled();
1161 private native void nativeSetAllowLocationEnabled(boolean allow); 1173 private native void nativeSetAllowLocationEnabled(boolean allow);
1162 private native void nativeSetNotificationsEnabled(boolean allow); 1174 private native void nativeSetNotificationsEnabled(boolean allow);
1175 private native void nativeSetNotificationsVibrateEnabled(boolean enabled);
1163 private native void nativeSetPasswordEchoEnabled(boolean enabled); 1176 private native void nativeSetPasswordEchoEnabled(boolean enabled);
1164 private native void nativeSetCrashReportingEnabled(boolean reporting); 1177 private native void nativeSetCrashReportingEnabled(boolean reporting);
1165 private native boolean nativeIsCrashReportingEnabled(); 1178 private native boolean nativeIsCrashReportingEnabled();
1166 private native boolean nativeCanPrefetchAndPrerender(); 1179 private native boolean nativeCanPrefetchAndPrerender();
1167 private native AboutVersionStrings nativeGetAboutVersionStrings(); 1180 private native AboutVersionStrings nativeGetAboutVersionStrings();
1168 private native void nativeSetContextualSearchPreference(String preference); 1181 private native void nativeSetContextualSearchPreference(String preference);
1169 private native String nativeGetContextualSearchPreference(); 1182 private native String nativeGetContextualSearchPreference();
1170 private native boolean nativeGetContextualSearchPreferenceIsManaged(); 1183 private native boolean nativeGetContextualSearchPreferenceIsManaged();
1171 private native boolean nativeGetSearchSuggestEnabled(); 1184 private native boolean nativeGetSearchSuggestEnabled();
1172 private native void nativeSetSearchSuggestEnabled(boolean enabled); 1185 private native void nativeSetSearchSuggestEnabled(boolean enabled);
(...skipping 24 matching lines...) Expand all
1197 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( ); 1210 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( );
1198 private native boolean nativeGetMetricsReportingEnabled(); 1211 private native boolean nativeGetMetricsReportingEnabled();
1199 private native void nativeSetMetricsReportingEnabled(boolean enabled); 1212 private native void nativeSetMetricsReportingEnabled(boolean enabled);
1200 private native boolean nativeHasSetMetricsReporting(); 1213 private native boolean nativeHasSetMetricsReporting();
1201 private native void nativeSetClickedUpdateMenuItem(boolean clicked); 1214 private native void nativeSetClickedUpdateMenuItem(boolean clicked);
1202 private native boolean nativeGetClickedUpdateMenuItem(); 1215 private native boolean nativeGetClickedUpdateMenuItem();
1203 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v ersion); 1216 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v ersion);
1204 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem(); 1217 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem();
1205 private native void nativeSetSupervisedUserId(String supervisedUserId); 1218 private native void nativeSetSupervisedUserId(String supervisedUserId);
1206 } 1219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698