Commit Graph

3286 Commits

Author SHA1 Message Date
Gustav Sennton
a8366e78b5 Fix loading of null webview if there is no webview package.
In the change in go/ag/672863 we throw an AndroidRuntimeException
instead of a PackageManager.NameNotFoundException when no webview
package exists. This should break devices not using webview since
the NameNotFoundException is used to detect webview not being present
(so that the null webview can be loaded instead). In this patch we
create a new type of exception and look for that one instead when we
want to determine whether the device should or should not have webview
installed.

Change-Id: Ia75dec718d7a5b2c3517671c54be3950badb8bba
2015-04-20 14:56:23 +01:00
Gustav Sennton
c82a99d5f7 Merge "Load WebView from one out of a list of packages." 2015-04-16 10:14:04 +00:00
Selim Gurun
30982c778d Enable onProvideVirtualAssistStructure API
Bug: b/19771298

onProvideVirtualAssistStructure API was hardwired to call the super
method prevent any crashes when assist gesture is used. Enable it.

Change-Id: I333f9f024ffb34af6a2cfa7e4b66ae233d73eb41
2015-04-14 14:20:45 -07:00
Gustav Sennton
2ed6fee15c Load WebView from one out of a list of packages.
Use a priority list of WebView packages instead of a single package to
determine which package to load WebView from.
This to allow a future version of Chrome to provide the WebView
implementation.

Change-Id: I42e900f0e63152188ebfcff9e39e0d9a99bc6c90
2015-04-14 12:14:51 +01:00
Gustav Sennton
1b4edc9068 Merge "Revert "Load WebView from one out of a list of packages."" 2015-04-14 10:59:35 +00:00
Gustav Sennton
9915eb56fe Revert "Load WebView from one out of a list of packages."
This reverts commit fe320b2fe9.
We need to check in a new Webview APK first.

Change-Id: Ica6adef7a1e68c06b4c6a6a3c851f40f56b006ef
2015-04-14 10:48:05 +00:00
Gustav Sennton
75f4b76638 Merge "Load WebView from one out of a list of packages." 2015-04-14 09:46:10 +00:00
Gustav Sennton
fe320b2fe9 Load WebView from one out of a list of packages.
Use a priority list of WebView packages instead of a single package to
determine which package to load WebView from.
This to allow a future version of Chrome to provide the WebView
implementation.

Change-Id: Id63a31396c8c0afbfd250f43a256ccd5981f7a56
2015-04-08 17:45:22 +01:00
Selim Gurun
7e01c4ceb6 Fix Google app crash
Bug: 20110378

Until chromium imlementation lands, use the base implementation.

Change-Id: Icd8e83503770471219718fb38a131938b1bbf0c2
2015-04-07 18:40:14 -07:00
Selim Gurun
1b650cb6f9 Add the Assist support to Webview
Bug: 19771298

Implement the Webview API to provide assist data. Webview assist
data is provided asynchronously.

Change-Id: I2fbf3e5ce7779ba6664dfbc6a702880fe71d5126
2015-04-06 20:13:37 -07:00
Selim Gurun
fc90c05649 Remove unnecessary code
Bug: 19313118

As part of the "better error reporting for Webview" work, a new public
API was defined for MNC release to report blocked loads. However,
we decided to use WebChromeClient.onConsoleMessage for this case.
Removing the API.

Change-Id: I1a599385f1ecdd10ba5a774b0b2a6b9f4bdcbd95
2015-03-30 16:41:06 -07:00
Tim Volodine
6e3d794b90 Merge "Invoke geolocation permissions callback with denied state by default." 2015-03-27 16:45:26 +00:00
Tim Volodine
954d1333c4 Invoke geolocation permissions callback with denied state by default.
For apps that use WebView but don't override
WebChromeClient.onGeolocationPermissionsShowPrompt the callback should
be invoked with allow set to false by default. This ensures that
the error handler callback in JavaScript is invoked in this case (with
the "User denied Geolocation" error). Currently no callbacks are invoked
at all by default (see http://crbug.com/470500).

Change-Id: I49664906b8cfa6910106c8da1b21b99628adacfc
2015-03-25 12:12:37 +00:00
Bo Liu
17a7989904 Remove debug logging from WebView
Moving them to chromium:
https://codereview.chromium.org/1022993002/

Change-Id: I6a9294b7041e9768397a624e5c174b22f4085e87
2015-03-19 14:19:29 -07:00
Chris Craik
43c410eaac Merge "Remove HardwareCanvas" 2015-03-18 21:36:56 +00:00
Tobias Sargeant
a8352f4031 Add visual state callbacks to the WebView.
Registering a visual state callback allows the caller to be notified
after the commit, activation and swap of the current (or future) state
of the DOM tree has occurred. At the point at which the callback is
called, the caller can be sure that any DOM updates made prior to
the registration are ready to be drawn in the next WebView#onDraw.

We also provide a convenience callback related to the visual state:

* WebViewClient.onPageCommitVisible; called at the earliest point at
  which the next draw will not render contents from the previously
  loaded page.

Bug: 6375170
Change-Id: I17e706b6e6ba4a8c28c835552687c9f7a4623024
2015-03-17 15:19:07 +00:00
Hui Shu
d7c7e566aa Merge "Add API for WebView OffscreenPreRaster setting." 2015-03-13 00:38:47 +00:00
Hui Shu
b1ee70b149 Add API for WebView OffscreenPreRaster setting.
BUG: 19592029
Change-Id: Ic903b823e5f7830e2cf2d4f3dd9a5458334648a3
2015-03-12 16:04:07 -07:00
Selim Gurun
4c8093afe3 Implement PostMessage API for Webview
Bug: 10237116

This CL implements the postmessage API for webview. It provides
a way for java applications to post messages to JS frames and
establish message channels, and then do full-duplex communication
after that.

Change-Id: Idbc2918552a4c9fd28ae1ddf19bd360e71f8a4a2
2015-03-11 10:21:59 -07:00
Chris Craik
f6829a0a61 Remove HardwareCanvas
Change-Id: I239646a7f00f09d3f76fe6b6162eed86bc0d6e77
2015-03-10 14:56:11 -07:00
Torne (Richard Coles)
8c1db3734f Merge "Fix typo in WebSettings javadoc." 2015-03-06 17:25:49 +00:00
Torne (Richard Coles)
2b666c96e2 Fix typo in WebSettings javadoc.
We accidentally repeated the same enum value twice; fixed to mention the
three values correctly.

Change-Id: Iba6a7edd8e1a5b429728056a8f56634427758c73
2015-03-06 14:20:00 +00:00
Mikhail Naganov
25e8954573 Provide better error reporting for WebView
Add new callbacks into WebViewClient that will provide notifications
about subresource loading errors and HTTP errors received from servers.

Bug: 19313118
Change-Id: Idb47f53ef7e72cb95f3e9b89d1e238d69e896b8b
2015-03-06 10:12:14 +00:00
Ed Heyl
93cbe27804 Fix build: Revert "Add potential future APIs for postmessage"
This reverts commit 37bd8907cb.
2015-03-02 16:03:52 -08:00
Selim Gurun
61c5cf135d am 4de38166: am aef98356: am 9fc8356b: Merge "Add potential future APIs for postmessage"
* commit '4de38166c6dbc1108a64cf772abe61b6ddaa2804':
  Add potential future APIs for postmessage
2015-03-02 23:21:54 +00:00
Selim Gurun
aef983562a am 9fc8356b: Merge "Add potential future APIs for postmessage"
* commit '9fc8356baa7816a13e0c140788ccf67301cbd28d':
  Add potential future APIs for postmessage
2015-03-02 23:07:36 +00:00
Selim Gurun
37bd8907cb Add potential future APIs for postmessage
Bug: 10237116

The APIs are hidden while work is ongoing.

Change-Id: I3e2f06d6e41af276171b127f06bdd74924c2e74c
2015-03-02 14:53:01 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
Narayan Kamath
3bdd327f85 Move apache specific portions of android.net.http to external/apache-http.
We continue to compile external/apache-http into ext.jar. This contains
a few changes apart fom the classes moving around :

- Makefile changes to build docs and api-stubs for now. A future change
  will revert these changes and remove these classes from stubs and
  docs.
- Hardcode event IDs in legacyerrorstrings to avoid a dependency between
  the frameworks and apache. These strings are on their way out and will
  never change anyway.
- Remove imports due to {@link} tags and use {@code} instead.
- Remove an accidental(?) dependency on apache commons code that's a
  part of apache-http.

bug: 18027885

Change-Id: I51cd038d846ec7d02c283a4541b10a6a9cf62ecf
2015-02-12 11:15:49 +00:00
Dianne Hackborn
a7bb6fbeab First quick implementation of auto assist data.
Introduce new AssistData class that contains all data
the framework automatically generates for assist.  Currently
populated with a very simple tree structure representing
the app's view hierarchy.

Reworked how we populate the class name for accessibility
info, so this is provided through a new method call on View
that subclasses can override.  This method is also used
to populate the class name in AssistData.

Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
2015-02-06 10:42:44 -08:00
Marcin Kosiba
d26b16cbdf Merge "Update docs to say onPageStarted is not called for fragment navigations." 2015-02-02 10:22:43 +00:00
Marcin Kosiba
16687cc956 Update docs to say onPageStarted is not called for fragment navigations.
BUG: 5014122
Change-Id: I264f99cb01496895f5ed77bfb3a5a45329bca53e
2015-01-27 17:35:49 +00:00
Marcin Kosiba
fbdb13e91d Update docs for WebResourceRequest.hasUserGesture.
WebResourceRequest.hasUserGesture will be false for new windows for
example. Update docs to say we sometimes say false even though
it 'should' be true.

BUG: 17963383
Change-Id: I877fc7179443647ea6c9dcf8607242874bbe9e09
2015-01-27 17:00:17 +00:00
Ignacio Solla
3fed946aee Merge "[WebView] Improve documentation around full screen mode." 2015-01-22 10:55:19 +00:00
Ignacio Solla
7a4e18f8b8 [WebView] Improve documentation around full screen mode.
onShowCustomView and onHideCustomView are only used for full screen
support so we make that more explicit now (perhaps we should consider
rename and deprecate).

In M40 the WebView will also support full screen for non <video>
elements so we also consider that use case.

Change-Id: Ie4e245defbdd3e53bff98ac73305dd5e5e46334c
2015-01-22 10:35:07 +00:00
Marcin Kosiba
3e853fb1d2 Un-break the WebView build.
This renames methods that have been renamed in
Ib9d403156c1fc4fb04f65f3c126d1277a44b3740 back to their original
names.

Change-Id: I07b2fb94b21c42c36958855d19d996f96b0ce5c4
2015-01-08 12:45:40 +00:00
Alan Viverette
2d4c476aca Merge "Fix accessibility delegation" 2015-01-08 00:07:25 +00:00
Alan Viverette
a54956a0bc Fix accessibility delegation
Ensures that delegate code is run last. Previously, calling the super
method from an accessibility delegate set on a widget would only run
code in the widget's parent. Next, the delegate code would run. Finally,
the widget's code would run. As a result, the widget code would override
any data supplied by the delegate.

By moving all overridden code to internal methods, we ensure that the
call chain for super includes the widget's parent code followed by the
widget's code. The delegate code will always run last.

BUG: 17641433
Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
2015-01-07 16:05:02 -08:00
Ben Murdoch
bc20686f92 am 6a3e7015: am d4bc9577: am 1eee52b1: Merge "Add <ol> formatting to WebView#enableSlowWholeDocumentDraw documentation." into lmp-mr1-dev
* commit '6a3e70159cbbd3c4b7df89165c280ea4f7d56fa5':
  Add <ol> formatting to WebView#enableSlowWholeDocumentDraw documentation.
2015-01-07 16:06:33 +00:00
Ben Murdoch
6a3e70159c am d4bc9577: am 1eee52b1: Merge "Add <ol> formatting to WebView#enableSlowWholeDocumentDraw documentation." into lmp-mr1-dev
* commit 'd4bc95770ddfcb8be63fa768ac9eaf27512f8107':
  Add <ol> formatting to WebView#enableSlowWholeDocumentDraw documentation.
2015-01-07 16:01:27 +00:00
Ben Murdoch
574fa34dd5 Add <ol> formatting to WebView#enableSlowWholeDocumentDraw documentation.
Bug:18072267
Change-Id: I21eec752ca9a0a6c0dab92f3748e687dd13961fa
2015-01-07 15:13:48 +00:00
Marcin Kosiba
84644f107d Add WebView documentation about the layout height parameter.
BUG: 12825214
Change-Id: I8e0e8b79af1a5358307de34e1b4238ec9a1d19ad
2014-12-15 11:26:16 +00:00
Paul Miller
9d67f36651 Update CookieManager documentation
The CookieManager documentation became incorrect after deprecating
CookieSyncManager. Remove the note about CookieSyncManager.

code.google.com/p/android/issues/detail?id=82052

Change-Id: I13bc52716cd71e47b67148186a69f7269e418864
2014-12-12 22:08:03 +00:00
Narayan Kamath
24009c1b87 am f1459604: am ed2c9c60: am 10a36fb7: Merge "Stop using ErrorStrings for apache."
* commit 'f1459604392dc0416500e149f1bafa11139dcfcc':
  Stop using ErrorStrings for apache.
2014-11-27 18:09:40 +00:00
Narayan Kamath
f145960439 am ed2c9c60: am 10a36fb7: Merge "Stop using ErrorStrings for apache."
* commit 'ed2c9c6029b18df9c25d6c98c909ac5f300d6ab1':
  Stop using ErrorStrings for apache.
2014-11-27 18:03:15 +00:00
Narayan Kamath
f1a9b1bc24 Stop using ErrorStrings for apache.
These strings only ever end up in logcat (at best), so there's no
point having them translated. Also, rename the ErrorStrings class
and move it android.webkit where the last remaining caller lives.

(congrats webview people, this is now your mess to maintain.)

Change-Id: I04dae37c34191b26a69282970318c1b782af1edf
2014-11-27 17:23:41 +00:00
Ignacio Solla
03c76e2b55 Merge "[WebView] Remove fallback call to WebViewFactoryProvider no-arg constructor." 2014-11-27 15:28:01 +00:00
Ignacio Solla
ea1d90f5da [WebView] Allow the WebView to be compiled against the system SDK.
BUG:18152150
Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
2014-11-25 17:03:49 +00:00
Narayan Kamath
57616d3e55 resolved conflicts for merge of 18e3727f to master
Change-Id: I3d74db13f163ac3f23955b6c7d8469e7a8f93066
2014-11-21 11:57:07 +00:00
John Reck
18e3727f68 am 0b2dac34: Merge "Rename callDrawGLFunction" into lmp-mr1-dev
automerge: 9b5d427

* commit '9b5d427fe0e557d572657252e7b5a3fd99a74550':
  Rename callDrawGLFunction
2014-11-21 02:55:00 +00:00