OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.webapps; | 5 package org.chromium.chrome.browser.webapps; |
6 | 6 |
7 import android.content.Intent; | 7 import android.content.Intent; |
8 | 8 |
9 import org.chromium.base.ContextUtils; | 9 import org.chromium.base.ContextUtils; |
10 import org.chromium.base.library_loader.LibraryProcessType; | 10 import org.chromium.base.library_loader.LibraryProcessType; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 /** | 150 /** |
151 * Initializes {@link ChildProcessCreationParams} as a WebAPK's renderer pro
cess if | 151 * Initializes {@link ChildProcessCreationParams} as a WebAPK's renderer pro
cess if |
152 * {@link isForWebApk}} is true; as Chrome's child process otherwise. | 152 * {@link isForWebApk}} is true; as Chrome's child process otherwise. |
153 * @param isForWebApk: Whether the {@link ChildProcessCreationParams} is ini
tialized as a | 153 * @param isForWebApk: Whether the {@link ChildProcessCreationParams} is ini
tialized as a |
154 * WebAPK renderer process. | 154 * WebAPK renderer process. |
155 */ | 155 */ |
156 private void initializeChildProcessCreationParams(boolean isForWebApk) { | 156 private void initializeChildProcessCreationParams(boolean isForWebApk) { |
157 ChromeApplication chrome = (ChromeApplication) ContextUtils.getApplicati
onContext(); | 157 ChromeApplication chrome = (ChromeApplication) ContextUtils.getApplicati
onContext(); |
158 ChildProcessCreationParams params = chrome.getChildProcessCreationParams
(); | 158 ChildProcessCreationParams params = chrome.getChildProcessCreationParams
(); |
159 if (isForWebApk) { | 159 if (isForWebApk) { |
160 int extraBindFlag = params == null ? 0 : params.getExtraBindFlags(); | |
161 params = new ChildProcessCreationParams(getWebappInfo().webApkPackag
eName(), | 160 params = new ChildProcessCreationParams(getWebappInfo().webApkPackag
eName(), |
162 extraBindFlag, LibraryProcessType.PROCESS_CHILD); | 161 LibraryProcessType.PROCESS_CHILD); |
163 } | 162 } |
164 ChildProcessCreationParams.set(params); | 163 ChildProcessCreationParams.set(params); |
165 } | 164 } |
166 | 165 |
167 @Override | 166 @Override |
168 protected void onDestroyInternal() { | 167 protected void onDestroyInternal() { |
169 if (mUpdateManager != null) { | 168 if (mUpdateManager != null) { |
170 mUpdateManager.destroy(); | 169 mUpdateManager.destroy(); |
171 } | 170 } |
172 super.onDestroyInternal(); | 171 super.onDestroyInternal(); |
173 } | 172 } |
174 } | 173 } |
OLD | NEW |