Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will the android webView be Chrome engine based since android 4.1?

According to 2012 google I/O talk (excerpt below), android webView will be chromium based since version 4.1. Is this already the case for the source code downloaded?

In addition, how should I interpret the statement that "WebView and Chrome browser will be the same"? Does that mean the chrome browser will be built upon webView just as the original android browser was.

Q: With Chrome on Android what happens to the original Android browser and WebView?

A: ICS->JB upgrade will not pre-install Chrome. WebView will be converted to Chromium based code. Android and Chrome engineers are working together.

Q: Will WebView get updated?

A: WebView and Chrome browser will be the same when the OS is upgraded. Every 6 weeks Chrome will be updated but WebView will not. Just to be careful not to break anything.

http://www.zdnet.com/blog/burnette/google-io-2012-android-fireside-chat/2637

like image 718
pierrotlefou Avatar asked Aug 30 '12 08:08

pierrotlefou


2 Answers

pierr, Based on what I see in the chromium source code it does not look like Chrome is built on top of WebView. I can see that a new class named ContentView is used by Chrome to function as the Chrome equivalent of "WebView".

The way I would interpret the statement you have mentioned is that Chrome & Android's WebView will share the same underlying WebKit code and potentially the interfaces that connect the Java layer functionality to C++ code. At least for the time being, Chrome is likely to use its own implementation of a webview-like class for its purposes.

like image 198
vino Avatar answered Oct 04 '22 02:10

vino


A look at the Android 4.1 sourcecode on GrepCode shows that the webview can only use one provider: the classic webview provider, which is based on the stock Android Browser.

In Android 4.2, the WebView has 2 possible providers: the classic webview provider and the chromium webview provider. However, the Chromium webview works only in non-release (debug) versions of Android, and only if you enable a special flag. The default provider for the WebView is still the classic webview based on the stock Android Browser.

For a deep dive into the Android source code that supports these assertions: http://bricolsoftconsulting.com/jellybean-webview-html-rendering-engine/

As far as "WebView and Chrome browser will be the same when the OS is upgraded", I interpret that to mean that both the webview and Chrome will share the same rendering engine when a new version of the Android OS is released. As new Chrome app releases come out every 6 weeks, the webview will continue to use the original Chrome rendering engine that shipped with the OS, while the Chrome app will use the Chrome rendering engine in the latest 6-week update.

like image 42
Theo Avatar answered Oct 04 '22 04:10

Theo