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

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

Issue 850813002: Upstream Site Settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@location_settings_singleton
Patch Set: use findbugs annotations; fix test Created 5 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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; 5 package org.chromium.chrome.browser;
6 6
7 import org.chromium.base.CalledByNative; 7 import org.chromium.base.CalledByNative;
8 import org.chromium.chrome.browser.preferences.LocationSettings;
8 import org.chromium.content.app.ContentApplication; 9 import org.chromium.content.app.ContentApplication;
9 10
10 /** 11 /**
11 * Basic application functionality that should be shared among all browser appli cations that use 12 * Basic application functionality that should be shared among all browser appli cations that use
12 * chrome layer. 13 * chrome layer.
13 */ 14 */
14 public abstract class ChromiumApplication extends ContentApplication { 15 public abstract class ChromiumApplication extends ContentApplication {
15 16
16 /** 17 /**
17 * Returns the class name of the Settings activity. 18 * Returns the class name of the Settings activity.
18 */ 19 */
19 public abstract String getSettingsActivityName(); 20 public abstract String getSettingsActivityName();
20 21
21 /** 22 /**
22 * Opens a protected content settings page, if available. 23 * Opens a protected content settings page, if available.
23 */ 24 */
24 @CalledByNative 25 @CalledByNative
25 protected void openProtectedContentSettings() {} 26 protected void openProtectedContentSettings() {}
26 27
27 @CalledByNative 28 @CalledByNative
28 protected void showAutofillSettings() {} 29 protected void showAutofillSettings() {}
29 30
30 @CalledByNative 31 @CalledByNative
31 protected void showPasswordSettings() {} 32 protected void showPasswordSettings() {}
32 33
33 /** 34 /**
35 * Returns an instance of LocationSettings to be installed as a singleton.
36 */
37 public LocationSettings createLocationSettings() {
38 return new LocationSettings(this);
39 }
40
41 /**
34 * Opens the UI to clear browsing data. 42 * Opens the UI to clear browsing data.
35 * @param tab The tab that triggered the request. 43 * @param tab The tab that triggered the request.
36 */ 44 */
37 @CalledByNative 45 @CalledByNative
38 protected void openClearBrowsingData(Tab tab) {} 46 protected void openClearBrowsingData(Tab tab) {}
39 47
40 /** 48 /**
41 * @return Whether parental controls are enabled. Returning true will disab le 49 * @return Whether parental controls are enabled. Returning true will disab le
42 * incognito mode. 50 * incognito mode.
43 */ 51 */
44 @CalledByNative 52 @CalledByNative
45 protected abstract boolean areParentalControlsEnabled(); 53 protected abstract boolean areParentalControlsEnabled();
46 54
47 // TODO(yfriedman): This is too widely available. Plumb this through ChromeN etworkDelegate 55 // TODO(yfriedman): This is too widely available. Plumb this through ChromeN etworkDelegate
48 // instead. 56 // instead.
49 protected abstract PKCS11AuthenticationManager getPKCS11AuthenticationManage r(); 57 protected abstract PKCS11AuthenticationManager getPKCS11AuthenticationManage r();
50 58
51 /** 59 /**
52 * @return The user agent string of Chrome. 60 * @return The user agent string of Chrome.
53 */ 61 */
54 public static String getBrowserUserAgent() { 62 public static String getBrowserUserAgent() {
55 return nativeGetBrowserUserAgent(); 63 return nativeGetBrowserUserAgent();
56 } 64 }
57 65
58 private static native String nativeGetBrowserUserAgent(); 66 private static native String nativeGetBrowserUserAgent();
59 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698