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; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 public IBinder bind(Intent intent, int authorizedCallerUid) { | 328 public IBinder bind(Intent intent, int authorizedCallerUid) { |
329 mAuthorizedCallerUid = authorizedCallerUid; | 329 mAuthorizedCallerUid = authorizedCallerUid; |
330 initializeParams(intent); | 330 initializeParams(intent); |
331 return mBinder; | 331 return mBinder; |
332 } | 332 } |
333 | 333 |
334 private void initializeParams(Intent intent) { | 334 private void initializeParams(Intent intent) { |
335 synchronized (mMainThread) { | 335 synchronized (mMainThread) { |
336 // mLinkerParams is never used if Linker.isUsed() returns false. | 336 // mLinkerParams is never used if Linker.isUsed() returns false. |
337 // See onCreate(). | 337 // See onCreate(). |
338 mLinkerParams = new ChromiumLinkerParams(intent); | 338 mLinkerParams = (ChromiumLinkerParams) intent.getParcelableExtra( |
| 339 ChildProcessConstants.EXTRA_LINKER_PARAMS); |
339 mLibraryProcessType = ChildProcessCreationParams.getLibraryProcessTy
pe(intent); | 340 mLibraryProcessType = ChildProcessCreationParams.getLibraryProcessTy
pe(intent); |
340 mMainThread.notifyAll(); | 341 mMainThread.notifyAll(); |
341 } | 342 } |
342 } | 343 } |
343 | 344 |
344 private void getServiceInfo(Bundle bundle) { | 345 private void getServiceInfo(Bundle bundle) { |
345 // Required to unparcel FileDescriptorInfo. | 346 // Required to unparcel FileDescriptorInfo. |
346 bundle.setClassLoader(mHostClassLoader); | 347 bundle.setClassLoader(mHostClassLoader); |
347 synchronized (mMainThread) { | 348 synchronized (mMainThread) { |
348 if (mCommandLineParams == null) { | 349 if (mCommandLineParams == null) { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 private static native void nativeInitChildProcessImpl( | 430 private static native void nativeInitChildProcessImpl( |
430 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures)
; | 431 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures)
; |
431 | 432 |
432 /** | 433 /** |
433 * Force the child process to exit. | 434 * Force the child process to exit. |
434 */ | 435 */ |
435 private static native void nativeExitChildProcess(); | 436 private static native void nativeExitChildProcess(); |
436 | 437 |
437 private native void nativeShutdownMainThread(); | 438 private native void nativeShutdownMainThread(); |
438 } | 439 } |
OLD | NEW |