Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / java / 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.KeyEvent;
11 import android.view.View;
12
13 /**
14  * The interface to provide the bridge between XWalkRuntimeView and the
15  * real implementation like runtime core.
16  *
17  */
18 public interface XWalkRuntimeViewProvider {
19     // For handling life cycle and activity result.
20     public void onCreate();
21     public void onResume();
22     public void onPause();
23     public void onDestroy();
24     public void onActivityResult(int requestCode, int resultCode, Intent data);
25     public boolean onNewIntent(Intent intent);
26
27     // For RuntimeView APIs.
28     public String getVersion();
29     public View getView();
30     public void loadAppFromUrl(String url);
31     public void loadAppFromManifest(String manifestUrl);
32     public String enableRemoteDebugging(String frontEndUrl, String socketName);
33     public void disableRemoteDebugging();
34     public boolean onKeyUp(int KeyCode, KeyEvent event);
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 }