| 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 import android.os.Bundle; | 8 import android.os.Bundle; |
| 9 | 9 |
| 10 import org.chromium.base.ContextUtils; | 10 import org.chromium.base.ContextUtils; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 * Initializes {@link ChildProcessCreationParams} as a WebAPK's renderer pro
cess if | 159 * Initializes {@link ChildProcessCreationParams} as a WebAPK's renderer pro
cess if |
| 160 * {@link isForWebApk}} is true; as Chrome's child process otherwise. | 160 * {@link isForWebApk}} is true; as Chrome's child process otherwise. |
| 161 * @param isForWebApk: Whether the {@link ChildProcessCreationParams} is ini
tialized as a | 161 * @param isForWebApk: Whether the {@link ChildProcessCreationParams} is ini
tialized as a |
| 162 * WebAPK renderer process. | 162 * WebAPK renderer process. |
| 163 */ | 163 */ |
| 164 private void initializeChildProcessCreationParams(boolean isForWebApk) { | 164 private void initializeChildProcessCreationParams(boolean isForWebApk) { |
| 165 // TODO(hanxi): crbug.com/664530. WebAPKs shouldn't use a global ChildPr
ocessCreationParams. | 165 // TODO(hanxi): crbug.com/664530. WebAPKs shouldn't use a global ChildPr
ocessCreationParams. |
| 166 ChildProcessCreationParams params = mDefaultParams; | 166 ChildProcessCreationParams params = mDefaultParams; |
| 167 if (isForWebApk) { | 167 if (isForWebApk) { |
| 168 boolean isExternalService = false; | 168 boolean isExternalService = false; |
| 169 boolean bindToCaller = false; |
| 169 params = new ChildProcessCreationParams(getWebappInfo().webApkPackag
eName(), | 170 params = new ChildProcessCreationParams(getWebappInfo().webApkPackag
eName(), |
| 170 isExternalService, LibraryProcessType.PROCESS_CHILD); | 171 isExternalService, LibraryProcessType.PROCESS_CHILD, bindToC
aller); |
| 171 } | 172 } |
| 172 ChildProcessCreationParams.registerDefault(params); | 173 ChildProcessCreationParams.registerDefault(params); |
| 173 } | 174 } |
| 174 | 175 |
| 175 @Override | 176 @Override |
| 176 protected void onDestroyInternal() { | 177 protected void onDestroyInternal() { |
| 177 if (mUpdateManager != null) { | 178 if (mUpdateManager != null) { |
| 178 mUpdateManager.destroy(); | 179 mUpdateManager.destroy(); |
| 179 } | 180 } |
| 180 super.onDestroyInternal(); | 181 super.onDestroyInternal(); |
| 181 } | 182 } |
| 182 } | 183 } |
| OLD | NEW |