Home | History | Annotate | Download | only in app
      1 // Copyright 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 package org.chromium.content.app;
      6 
      7 import android.content.Context;
      8 
      9 import org.chromium.base.JNINamespace;
     10 
     11 /**
     12  * This class is used to initialize all types of process. It corresponds to
     13  * content/public/app/content_main.h which is not used in Android as it has
     14  * the different initialization process.
     15  *
     16  * TODO(michaelbai): Refactorying the BrowserProcessMain.java and the
     17  * ChildProcessService.java to start ContentMain, and run the process
     18  * specific initialization code in ContentMainRunner::Initialize.
     19  *
     20  **/
     21 @JNINamespace("content")
     22 public class ContentMain {
     23     /**
     24      * Initialize application context in native side.
     25      **/
     26     public static void initApplicationContext(Context context) {
     27         nativeInitApplicationContext(context);
     28     }
     29 
     30     /**
     31      * Start the ContentMainRunner in native side.
     32      **/
     33     public static int start() {
     34         return nativeStart();
     35     }
     36 
     37     private static native void nativeInitApplicationContext(Context context);
     38     private static native int nativeStart();
     39 }
     40