Upstream version 8.36.161.0
[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 onResume();
21     public void onPause();
22     public void onDestroy();
23     public void onActivityResult(int requestCode, int resultCode, Intent data);
24     public boolean onNewIntent(Intent intent);
25
26     // For RuntimeView APIs.
27     public String getVersion();
28     public View getView();
29     public void loadAppFromUrl(String url);
30     public void loadAppFromManifest(String manifestUrl);
31     public void enableRemoteDebugging(String frontEndUrl, String socketName);
32     public void disableRemoteDebugging();
33
34     // For instrumentation test.
35     public String getTitleForTest();
36     public void setCallbackForTest(Object callback);
37     public void loadDataForTest(String data, String mimeType, boolean isBase64Encoded);
38 }