Chromium Code Reviews| 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.content.app; | 5 package org.chromium.content.app; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.graphics.SurfaceTexture; | 9 import android.graphics.SurfaceTexture; |
| 10 import android.os.Binder; | 10 import android.os.Binder; |
| 11 import android.os.Bundle; | 11 import android.os.Bundle; |
| 12 import android.os.IBinder; | 12 import android.os.IBinder; |
| 13 import android.os.Parcel; | 13 import android.os.Parcel; |
| 14 import android.os.Parcelable; | 14 import android.os.Parcelable; |
| 15 import android.os.Process; | 15 import android.os.Process; |
| 16 import android.os.RemoteException; | 16 import android.os.RemoteException; |
| 17 import android.view.Surface; | 17 import android.view.Surface; |
| 18 | 18 |
| 19 import org.chromium.base.BaseSwitches; | 19 import org.chromium.base.BaseSwitches; |
| 20 import org.chromium.base.CommandLine; | 20 import org.chromium.base.CommandLine; |
| 21 import org.chromium.base.ContextUtils; | 21 import org.chromium.base.ContextUtils; |
| 22 import org.chromium.base.JNIUtils; | |
| 22 import org.chromium.base.Log; | 23 import org.chromium.base.Log; |
| 23 import org.chromium.base.UnguessableToken; | 24 import org.chromium.base.UnguessableToken; |
| 24 import org.chromium.base.annotations.CalledByNative; | 25 import org.chromium.base.annotations.CalledByNative; |
| 25 import org.chromium.base.annotations.JNINamespace; | 26 import org.chromium.base.annotations.JNINamespace; |
| 26 import org.chromium.base.annotations.MainDex; | 27 import org.chromium.base.annotations.MainDex; |
| 27 import org.chromium.base.annotations.SuppressFBWarnings; | 28 import org.chromium.base.annotations.SuppressFBWarnings; |
| 28 import org.chromium.base.annotations.UsedByReflection; | 29 import org.chromium.base.annotations.UsedByReflection; |
| 29 import org.chromium.base.library_loader.LibraryLoader; | 30 import org.chromium.base.library_loader.LibraryLoader; |
| 30 import org.chromium.base.library_loader.Linker; | 31 import org.chromium.base.library_loader.Linker; |
| 31 import org.chromium.base.library_loader.ProcessInitException; | 32 import org.chromium.base.library_loader.ProcessInitException; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 185 public void run() { | 186 public void run() { |
| 186 try { | 187 try { |
| 187 // CommandLine must be initialized before everything else. | 188 // CommandLine must be initialized before everything else. |
| 188 synchronized (mMainThread) { | 189 synchronized (mMainThread) { |
| 189 while (mCommandLineParams == null) { | 190 while (mCommandLineParams == null) { |
| 190 mMainThread.wait(); | 191 mMainThread.wait(); |
| 191 } | 192 } |
| 192 } | 193 } |
| 193 CommandLine.init(mCommandLineParams); | 194 CommandLine.init(mCommandLineParams); |
| 194 | 195 |
| 196 if ("renderer".equals(CommandLine.getInstance().getSwitchVal ue("type"))) { | |
|
Ted C
2017/01/31 17:56:54
Sad to kill your 100 char perfect line, but I thin
estevenson
2017/01/31 18:56:41
:(. Done.
Not sure, my best guess is that Content
| |
| 197 JNIUtils.enableSelectiveJniRegistration(); | |
| 198 } | |
| 199 | |
| 195 Linker linker = null; | 200 Linker linker = null; |
| 196 boolean requestedSharedRelro = false; | 201 boolean requestedSharedRelro = false; |
| 197 if (Linker.isUsed()) { | 202 if (Linker.isUsed()) { |
| 198 assert mLinkerParams != null; | 203 assert mLinkerParams != null; |
| 199 linker = getLinker(); | 204 linker = getLinker(); |
| 200 if (mLinkerParams.mWaitForSharedRelro) { | 205 if (mLinkerParams.mWaitForSharedRelro) { |
| 201 requestedSharedRelro = true; | 206 requestedSharedRelro = true; |
| 202 linker.initServiceProcess(mLinkerParams.mBaseLoadAdd ress); | 207 linker.initServiceProcess(mLinkerParams.mBaseLoadAdd ress); |
| 203 } else { | 208 } else { |
| 204 linker.disableSharedRelros(); | 209 linker.disableSharedRelros(); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 448 private static native void nativeInitChildProcessImpl( | 453 private static native void nativeInitChildProcessImpl( |
| 449 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures) ; | 454 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures) ; |
| 450 | 455 |
| 451 /** | 456 /** |
| 452 * Force the child process to exit. | 457 * Force the child process to exit. |
| 453 */ | 458 */ |
| 454 private static native void nativeExitChildProcess(); | 459 private static native void nativeExitChildProcess(); |
| 455 | 460 |
| 456 private native void nativeShutdownMainThread(); | 461 private native void nativeShutdownMainThread(); |
| 457 } | 462 } |
| OLD | NEW |