OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.app.ActivityManager; | 7 import android.app.ActivityManager; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.res.Resources; | 9 import android.content.res.Resources; |
10 import android.util.Log; | 10 import android.util.Log; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 int maxRenderers = normalizeMaxRendererProcesses(appContext, maxRenderer
Processes); | 127 int maxRenderers = normalizeMaxRendererProcesses(appContext, maxRenderer
Processes); |
128 Log.i(TAG, "Initializing chromium process, renderers=" + maxRenderers + | 128 Log.i(TAG, "Initializing chromium process, renderers=" + maxRenderers + |
129 " hostIsChrome=" + hostIsChrome); | 129 " hostIsChrome=" + hostIsChrome); |
130 | 130 |
131 // Now we really need to have the resources ready. | 131 // Now we really need to have the resources ready. |
132 resourceExtractor.waitForCompletion(); | 132 resourceExtractor.waitForCompletion(); |
133 | 133 |
134 nativeSetCommandLineFlags(maxRenderers, getPlugins(context)); | 134 nativeSetCommandLineFlags(maxRenderers); |
135 ContentMain.initApplicationContext(appContext); | 135 ContentMain.initApplicationContext(appContext); |
136 ContentMain.start(); | 136 ContentMain.start(); |
137 return true; | 137 return true; |
138 } | 138 } |
139 | 139 |
140 private static String getPlugins(final Context context) { | |
141 return ""; | |
142 } | |
143 | |
144 private static native void nativeSetCommandLineFlags( | 140 private static native void nativeSetCommandLineFlags( |
145 int maxRenderProcesses, String plugin_descriptor); | 141 int maxRenderProcesses); |
146 | 142 |
147 // Is this an official build of Chrome? Only native code knows | 143 // Is this an official build of Chrome? Only native code knows |
148 // for sure. Official build knowledge is needed very early in | 144 // for sure. Official build knowledge is needed very early in |
149 // process startup. | 145 // process startup. |
150 private static native boolean nativeIsOfficialBuild(); | 146 private static native boolean nativeIsOfficialBuild(); |
151 } | 147 } |
OLD | NEW |