Add missing changes from previous merge commit

This commit is contained in:
Andrew Grieve 2014-07-04 10:32:02 -04:00
parent 4ca2305693
commit a8330773ca
6 changed files with 6 additions and 46 deletions

View File

@ -65,7 +65,7 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom
private static final String LOG_TAG = "CordovaChromeClient";
private long MAX_QUOTA = 100 * 1024 * 1024;
protected CordovaInterface cordova;
protected CordovaWebView appView;
protected AndroidWebView appView;
// the video progress view
private View mVideoProgressView;
@ -73,35 +73,17 @@ public class AndroidChromeClient extends WebChromeClient implements CordovaChrom
// File Chooser
public ValueCallback<Uri> mUploadMessage;
/**
* Constructor.
*
* @param cordova
*/
public AndroidChromeClient(CordovaInterface cordova) {
this.cordova = cordova;
}
/**
* Constructor.
*
* @param ctx
* @param app
*/
public AndroidChromeClient(CordovaInterface ctx, CordovaWebView app) {
public AndroidChromeClient(CordovaInterface ctx, AndroidWebView app) {
this.cordova = ctx;
this.appView = app;
}
/**
* Constructor.
*
* @param view
*/
public void setWebView(CordovaWebView view) {
this.appView = view;
}
/**
* Tell the client to display a javascript alert dialog.
*

View File

@ -93,7 +93,7 @@ public class AndroidWebView extends WebView implements CordovaWebView {
private long lastMenuEventTime = 0;
NativeToJsMessageQueue jsMessageQueue;
ExposedJsApi exposedJsApi;
AndroidExposedJsApi exposedJsApi;
/** custom view created by the browser (a video player for example) */
private View mCustomView;
@ -235,7 +235,7 @@ public class AndroidWebView extends WebView implements CordovaWebView {
*/
@Override
public CordovaChromeClient makeWebChromeClient() {
return (CordovaChromeClient) new AndroidChromeClient(this.cordova);
return (CordovaChromeClient) new AndroidChromeClient(this.cordova, this);
}
/**
@ -991,22 +991,6 @@ public class AndroidWebView extends WebView implements CordovaWebView {
return this.pluginManager.getPlugin(initCallbackClass);
}
@Override
public String exec(String service, String action, String callbackId,
String message) throws JSONException {
return this.exposedJsApi.exec(service, action, callbackId, message);
}
@Override
public void setNativeToJsBridgeMode(int parseInt) {
this.exposedJsApi.setNativeToJsBridgeMode(parseInt);
}
@Override
public String retrieveJsMessages(boolean equals) {
return this.exposedJsApi.retrieveJsMessages(equals);
}
@Override
public boolean onOverrideUrlLoading(String url) {
return this.pluginManager.onOverrideUrlLoading(url);

View File

@ -753,7 +753,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
LOG.d(TAG, "Incoming Result");
super.onActivityResult(requestCode, resultCode, intent);
Log.d(TAG, "Request code = " + requestCode);
if (appView != null && requestCode == CordovaChromeClient.FILECHOOSER_RESULTCODE) {
if (appView != null && requestCode == AndroidChromeClient.FILECHOOSER_RESULTCODE) {
ValueCallback<Uri> mUploadMessage = ((CordovaChromeClient) this.appView.getWebChromeClient()).getValueCallback();
Log.d(TAG, "did we get here?");
if (null == mUploadMessage)

View File

@ -22,6 +22,5 @@ import android.net.Uri;
import android.webkit.ValueCallback;
public interface CordovaChromeClient {
void setWebView(CordovaWebView appView);
ValueCallback<Uri> getValueCallback();
}

View File

@ -102,12 +102,6 @@ public interface CordovaWebView {
boolean isCustomViewShowing();
String exec(String service, String action, String callbackId, String message) throws JSONException;
void setNativeToJsBridgeMode(int parseInt);
String retrieveJsMessages(boolean equals);
void showCustomView(View view, CustomViewCallback callback);
void hideCustomView();

View File

@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CallbackContext;