Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / public / android / java / src / org / chromium / content / app / ChildProcessService.java
index 769249e..3b44be0 100644 (file)
@@ -104,6 +104,11 @@ public class ChildProcessService extends Service {
             }
             return Process.myPid();
         }
+
+        @Override
+        public void crashIntentionallyForTesting() {
+            Process.killProcess(Process.myPid());
+        }
     };
 
     /* package */ static Context getContext() {
@@ -141,7 +146,7 @@ public class ChildProcessService extends Service {
                         }
                     }
                     try {
-                        LibraryLoader.loadNow();
+                        LibraryLoader.loadNow(getApplicationContext(), false);
                     } catch (ProcessInitException e) {
                         Log.e(TAG, "Failed to load native library, exiting child process", e);
                         System.exit(-1);
@@ -285,6 +290,22 @@ public class ChildProcessService extends Service {
         }
     }
 
+    @SuppressWarnings("unused")
+    @CalledByNative
+    private Surface getSurfaceTextureSurface(int primaryId, int secondaryId) {
+        if (mCallback == null) {
+            Log.e(TAG, "No callback interface has been provided.");
+            return null;
+        }
+
+        try {
+            return mCallback.getSurfaceTextureSurface(primaryId, secondaryId);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Unable to call getSurfaceTextureSurface: " + e);
+            return null;
+        }
+    }
+
     /**
      * The main entry point for a child process. This should be called from a new thread since
      * it will not return until the child process exits. See child_process_service.{h,cc}