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.
5 package org.xwalk.runtime;
7 import android.app.Activity;
8 import android.content.Context;
9 import android.content.Intent;
10 import android.view.View;
13 * The interface to provide the bridge between XWalkRuntimeView and the
14 * real implementation like runtime core.
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();
24 public void onDestroy();
25 public void onActivityResult(int requestCode, int resultCode, Intent data);
26 public boolean onNewIntent(Intent intent);
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();
36 // For instrumentation test.
37 public String getTitleForTest();
38 public void setCallbackForTest(Object callback);
39 public void loadDataForTest(String data, String mimeType, boolean isBase64Encoded);