bbc0185a7fe3bf097a22fc22379546c8c4a8f79a
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / runtime / src / org / xwalk / runtime / XWalkRuntimeViewProvider.java
1 // Copyright (c) 2013 Intel Corporation. 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.xwalk.runtime;
6
7 import android.app.Activity;
8 import android.content.Context;
9 import android.content.Intent;
10 import android.view.View;
11
12 /**
13  * The interface to provide the bridge between XWalkRuntimeView and the
14  * real implementation like runtime core.
15  *
16  */
17 interface XWalkRuntimeViewProvider {
18     // For handling life cycle and activity result.
19     public void onCreate();
20     public void onStart();
21     public void onResume();
22     public void onPause();
23     public void onStop();
24     public void onDestroy();
25     public void onActivityResult(int requestCode, int resultCode, Intent data);
26     public boolean onNewIntent(Intent intent);
27
28     // For RuntimeView APIs.
29     public String getVersion();
30     public View getView();
31     public void loadAppFromUrl(String url);
32     public void loadAppFromManifest(String manifestUrl);
33     public void enableRemoteDebugging(String frontEndUrl, String socketName);
34     public void disableRemoteDebugging();
35
36     // For instrumentation test.
37     public String getTitleForTest();
38     public void setCallbackForTest(Object callback);
39     public void loadDataForTest(String data, String mimeType, boolean isBase64Encoded);
40 }