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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 } | 426 } |
427 | 427 |
428 try { | 428 try { |
429 return mCallback.getSurfaceTextureSurface(surfaceTextureId).getSurfa
ce(); | 429 return mCallback.getSurfaceTextureSurface(surfaceTextureId).getSurfa
ce(); |
430 } catch (RemoteException e) { | 430 } catch (RemoteException e) { |
431 Log.e(TAG, "Unable to call getSurfaceTextureSurface: %s", e); | 431 Log.e(TAG, "Unable to call getSurfaceTextureSurface: %s", e); |
432 return null; | 432 return null; |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
| 436 @SuppressWarnings("unused") |
| 437 @CalledByNative |
| 438 private IBinder getDialogSurfaceManager() { |
| 439 try { |
| 440 return mCallback.getDialogSurfaceManager(); |
| 441 } catch (RemoteException e) { |
| 442 Log.e(TAG, "Unable to call getDialogSurfaceManager: %s", e); |
| 443 return null; |
| 444 } |
| 445 } |
| 446 |
436 /** | 447 /** |
437 * Helper for registering FileDescriptorInfo objects with GlobalFileDescript
ors. | 448 * Helper for registering FileDescriptorInfo objects with GlobalFileDescript
ors. |
438 * This includes the IPC channel, the crash dump signals and resource relate
d | 449 * This includes the IPC channel, the crash dump signals and resource relate
d |
439 * files. | 450 * files. |
440 */ | 451 */ |
441 private static native void nativeRegisterGlobalFileDescriptor( | 452 private static native void nativeRegisterGlobalFileDescriptor( |
442 int id, int fd, long offset, long size); | 453 int id, int fd, long offset, long size); |
443 | 454 |
444 /** | 455 /** |
445 * The main entry point for a child process. This should be called from a ne
w thread since | 456 * The main entry point for a child process. This should be called from a ne
w thread since |
446 * it will not return until the child process exits. See child_process_servi
ce.{h,cc} | 457 * it will not return until the child process exits. See child_process_servi
ce.{h,cc} |
447 * | 458 * |
448 * @param serviceImpl The current ChildProcessServiceImpl object. | 459 * @param serviceImpl The current ChildProcessServiceImpl object. |
449 * renderer. | 460 * renderer. |
450 */ | 461 */ |
451 private static native void nativeInitChildProcessImpl( | 462 private static native void nativeInitChildProcessImpl( |
452 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures)
; | 463 ChildProcessServiceImpl serviceImpl, int cpuCount, long cpuFeatures)
; |
453 | 464 |
454 /** | 465 /** |
455 * Force the child process to exit. | 466 * Force the child process to exit. |
456 */ | 467 */ |
457 private static native void nativeExitChildProcess(); | 468 private static native void nativeExitChildProcess(); |
458 | 469 |
459 private native void nativeShutdownMainThread(); | 470 private native void nativeShutdownMainThread(); |
460 } | 471 } |
OLD | NEW |