[ 
https://issues.apache.org/jira/browse/CB-7156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14063937#comment-14063937
 ] 

Andrew Grieve commented on CB-7156:
-----------------------------------

Some already-made changes:

https://github.com/apache/cordova-android/commit/663a71255ff0e3a7a3d31bda4cd72fa7b4de1283
* Move handling of Fullscreen preference to CordovaActivity from AndroidWebView

https://github.com/apache/cordova-android/commit/efcedabee098d28e7c3e87dc3a7414b4a235a5fc
* Moved copy & pasted ExposedJsApi into shared CordovaBridge class
* Delete Cordova*Client classes since they are webview-specific
  * Moved CordovaChromeClient.getValueCallback() -> 
CordovaWebView.onFilePickerResult()
* Delete View-specific methods from CordovaInterface (callers should use 
.getView() to get at the view)
* Reduces the number of loadUrl() overloads
* Delete addJavascript() (but leaves sendJavascript)
* Delete getPlugin() and postMessage() convenience methods (call them on 
PluginManager directly)
* Delete isPaused() - Used only by tests and is just a stored boolean of 
onPause onResume
* Delete getUrl(), but then added back in 
https://github.com/apache/cordova-android/commit/9b9c59766f2313db63f90e58afb13808e9280c59


Other APIs that might be unnecessary:
* void showWebPage(String errorUrl, boolean b, boolean c, HashMap<String, 
Object> params);
* boolean isCustomViewShowing();
* void showCustomView(View view, CustomViewCallback callback);
* void hideCustomView();
* void setNetworkAvailable(boolean online); (this one makes sense for the 
online bridge, but doesn't really make sense to expose to plugins)
    
There is also a good amount of copy & pasted code  between AndroidWebView and 
Crosswalk Webview:
* Splashscreen code
* page load timeout


> Make the pluggable webview API as good as possible
> --------------------------------------------------
>
>                 Key: CB-7156
>                 URL: https://issues.apache.org/jira/browse/CB-7156
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Andrew Grieve
>
> Some specific goals here:
> - Eliminate CordovaWebView APIs that are engine-specific (e.g. WebViewClient)
> - Eliminate CordovaWebView APIs that are convenience methods (no need for 
> every implementation to implement the same convenience methods)
> - Eliminate copy & pasted code between pluggable webviews
> This issue should be left open until 4.0.x stabilizes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to