Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java

Issue 2795333002: [Merge m58] Abstracting parameters passed to child processes on Android. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698