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

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

Issue 2763133002: Move showAutofillSettings to PreferencesLauncher. (Closed)
Patch Set: Move settings @CalledByNative functions to PreferencesLauncher. Created 3 years, 9 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/android/java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java » ('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 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 android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
11 import android.os.SystemClock; 11 import android.os.SystemClock;
12 import android.util.Log; 12 import android.util.Log;
13 13
14 import org.chromium.base.ActivityState; 14 import org.chromium.base.ActivityState;
15 import org.chromium.base.ApplicationStatus; 15 import org.chromium.base.ApplicationStatus;
16 import org.chromium.base.CommandLineInitUtil; 16 import org.chromium.base.CommandLineInitUtil;
17 import org.chromium.base.ContextUtils; 17 import org.chromium.base.ContextUtils;
18 import org.chromium.base.ThreadUtils; 18 import org.chromium.base.ThreadUtils;
19 import org.chromium.base.TraceEvent; 19 import org.chromium.base.TraceEvent;
20 import org.chromium.base.annotations.CalledByNative; 20 import org.chromium.base.annotations.CalledByNative;
21 import org.chromium.base.annotations.MainDex; 21 import org.chromium.base.annotations.MainDex;
22 import org.chromium.base.annotations.SuppressFBWarnings; 22 import org.chromium.base.annotations.SuppressFBWarnings;
23 import org.chromium.base.library_loader.ProcessInitException; 23 import org.chromium.base.library_loader.ProcessInitException;
24 import org.chromium.chrome.browser.document.DocumentActivity; 24 import org.chromium.chrome.browser.document.DocumentActivity;
25 import org.chromium.chrome.browser.document.IncognitoDocumentActivity; 25 import org.chromium.chrome.browser.document.IncognitoDocumentActivity;
26 import org.chromium.chrome.browser.init.InvalidStartupDialog; 26 import org.chromium.chrome.browser.init.InvalidStartupDialog;
27 import org.chromium.chrome.browser.metrics.UmaUtils; 27 import org.chromium.chrome.browser.metrics.UmaUtils;
28 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza tions; 28 import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomiza tions;
29 import org.chromium.chrome.browser.preferences.PreferencesLauncher; 29 import org.chromium.chrome.browser.preferences.PreferencesLauncher;
30 import org.chromium.chrome.browser.preferences.autofill.AutofillAndPaymentsPrefe rences;
31 import org.chromium.chrome.browser.preferences.password.SavePasswordsPreferences ; 30 import org.chromium.chrome.browser.preferences.password.SavePasswordsPreferences ;
32 import org.chromium.chrome.browser.tab.Tab; 31 import org.chromium.chrome.browser.tab.Tab;
33 import org.chromium.chrome.browser.tabmodel.document.ActivityDelegateImpl; 32 import org.chromium.chrome.browser.tabmodel.document.ActivityDelegateImpl;
34 import org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector; 33 import org.chromium.chrome.browser.tabmodel.document.DocumentTabModelSelector;
35 import org.chromium.chrome.browser.tabmodel.document.StorageDelegate; 34 import org.chromium.chrome.browser.tabmodel.document.StorageDelegate;
36 import org.chromium.chrome.browser.tabmodel.document.TabDelegate; 35 import org.chromium.chrome.browser.tabmodel.document.TabDelegate;
37 import org.chromium.content.app.ContentApplication; 36 import org.chromium.content.app.ContentApplication;
38 37
39 /** 38 /**
40 * Basic application functionality that should be shared among all browser appli cations that use 39 * Basic application functionality that should be shared among all browser appli cations that use
(...skipping 26 matching lines...) Expand all
67 initCommandLine(); 66 initCommandLine();
68 TraceEvent.maybeEnableEarlyTracing(); 67 TraceEvent.maybeEnableEarlyTracing();
69 TraceEvent.begin("ChromeApplication.onCreate"); 68 TraceEvent.begin("ChromeApplication.onCreate");
70 69
71 super.onCreate(); 70 super.onCreate();
72 71
73 TraceEvent.end("ChromeApplication.onCreate"); 72 TraceEvent.end("ChromeApplication.onCreate");
74 } 73 }
75 74
76 @CalledByNative 75 @CalledByNative
77 protected void showAutofillSettings() {
78 PreferencesLauncher.launchSettingsPage(
79 this, AutofillAndPaymentsPreferences.class.getName());
80 }
81
82 @CalledByNative
83 protected void showPasswordSettings() { 76 protected void showPasswordSettings() {
84 PreferencesLauncher.launchSettingsPage(this, 77 PreferencesLauncher.launchSettingsPage(this,
85 SavePasswordsPreferences.class.getName()); 78 SavePasswordsPreferences.class.getName());
86 } 79 }
87 80
88 /** 81 /**
89 * Shows an error dialog following a startup error, and then exits the appli cation. 82 * Shows an error dialog following a startup error, and then exits the appli cation.
90 * @param e The exception reported by Chrome initialization. 83 * @param e The exception reported by Chrome initialization.
91 */ 84 */
92 public static void reportStartupErrorAndExit(final ProcessInitException e) { 85 public static void reportStartupErrorAndExit(final ProcessInitException e) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 ThreadUtils.assertOnUiThread(); 181 ThreadUtils.assertOnUiThread();
189 if (sDocumentTabModelSelector == null) { 182 if (sDocumentTabModelSelector == null) {
190 ActivityDelegateImpl activityDelegate = new ActivityDelegateImpl( 183 ActivityDelegateImpl activityDelegate = new ActivityDelegateImpl(
191 DocumentActivity.class, IncognitoDocumentActivity.class); 184 DocumentActivity.class, IncognitoDocumentActivity.class);
192 sDocumentTabModelSelector = new DocumentTabModelSelector(activityDel egate, 185 sDocumentTabModelSelector = new DocumentTabModelSelector(activityDel egate,
193 new StorageDelegate(), new TabDelegate(false), new TabDelega te(true)); 186 new StorageDelegate(), new TabDelegate(false), new TabDelega te(true));
194 } 187 }
195 return sDocumentTabModelSelector; 188 return sDocumentTabModelSelector;
196 } 189 }
197 } 190 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698