summaryrefslogtreecommitdiffstats
path: root/android_webview
Commit message (Collapse)AuthorAgeFilesLines
* Support sending Web UriSelim Gurun2015-07-301-0/+2
| | | | | | | | | | | | | | | | BUG=497258,515202 When onProvideAssistContent is requested, send web uri unless incognito mode is enabled. Review URL: https://codereview.chromium.org/1260753003 Cr-Commit-Position: refs/heads/master@{#340629} (cherry picked from commit a8eb4d62dde410cb13dad0d9845364d2d5cbc37f) Review URL: https://codereview.chromium.org/1258513007 . Cr-Commit-Position: refs/branch-heads/2454@{#181} Cr-Branched-From: 12bfc3360892ec53cd00fc239a47e5298beb063b-refs/heads/master@{#338390}
* Provide an accessibility tree snapshotSelim Gurun2015-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | BUG=497258,515202 Provide an accessibility tree snapshot when requested. This CL contains a frameworks class that is taken from preview release and will be removed when the public SDK is available. Depends on https://codereview.chromium.org/1246163003/ Review URL: https://codereview.chromium.org/1246823003 Cr-Commit-Position: refs/heads/master@{#339968} (cherry picked from commit 650a6fa6cabd2c5a825af031e5f471cc4c7db60c) Review URL: https://codereview.chromium.org/1269663002 . Cr-Commit-Position: refs/branch-heads/2454@{#179} Cr-Branched-From: 12bfc3360892ec53cd00fc239a47e5298beb063b-refs/heads/master@{#338390}
* Invoke the geolocation callback only if there is pending request.Tao Bai2015-07-271-0/+8
| | | | | | | | | | | | | | | BUG=511338 TBR=boliu Review URL: https://codereview.chromium.org/1248803004 Cr-Commit-Position: refs/heads/master@{#340194} (cherry picked from commit 2b11e017ff2c8d4ec5322b7cdbf477b1b32a9c17) Review URL: https://codereview.chromium.org/1262453002 . Cr-Commit-Position: refs/branch-heads/2454@{#153} Cr-Branched-From: 12bfc3360892ec53cd00fc239a47e5298beb063b-refs/heads/master@{#338390}
* aw: Fix SetExtraRequestHeaderByName DCHECKMikhail Naganov2015-07-151-1/+2
| | | | | | | | | | | | | | | | Only set request headers when allowed. BUG=500318 Review URL: https://codereview.chromium.org/1233043002 Cr-Commit-Position: refs/heads/master@{#338633} (cherry picked from commit c352c70e8567370956eefb54e3b41dab48b1d50f) Review URL: https://codereview.chromium.org/1223113006 . Cr-Commit-Position: refs/branch-heads/2454@{#25} Cr-Branched-From: 12bfc3360892ec53cd00fc239a47e5298beb063b-refs/heads/master@{#338390}
* [Android WebView] Pass 'Referer' header to shouldInterceptRequestmnaganov2015-07-102-0/+33
| | | | | | | | | | | | 'Referer' header is set inside URLRequestHttpJob::Start, which is called after MaybeInterceptRequest, so we need to set them earlier in order for shouldInterceptRequest to see it. BUG=500318 Review URL: https://codereview.chromium.org/1229263004 Cr-Commit-Position: refs/heads/master@{#338334}
* [Android WebViewShell] Add new intent listener to send memory pressure signal.timvolodine2015-07-102-0/+59
| | | | | | | | | | | | This patch instroduces TelemetryMemoryPressureActivity which overrides the onNewIntent() method in order to propagate intents to MemoryPressureListener. It also makes sure the app stays in background while doing that. BUG=497100 Review URL: https://codereview.chromium.org/1163213002 Cr-Commit-Position: refs/heads/master@{#338283}
* Check user gesture before firing an intent in WebViewmnaganov2015-07-0911-19/+98
| | | | | | | | | | | | | Only fire intents when navigation is initiated by the user (via a gesture), or by the server (a redirect). This curbs down attempts to launch intents purely by JS code, which lead to a poor UX -- tasks appearing from nowhere. BUG=501633 Review URL: https://codereview.chromium.org/1180223004 Cr-Commit-Position: refs/heads/master@{#338133}
* Rebaseline global-interface-listing-expected.txttimvolodine2015-07-091-9/+10
| | | | | | | | | | | | | due to the following changes in blink: crrev.com/1229753005, crrev.com/1149373003, crrev.com/1217273009, crrev.com/1176013002 BUG=506603 TBR=torne@chromium.org Review URL: https://codereview.chromium.org/1226403002 Cr-Commit-Position: refs/heads/master@{#338050}
* Don't put every <img> in the page in a WebVector in ↵esprehn2015-07-081-6/+5
| | | | | | | | | | | | | | | | | | | | | | | AwRenderViewExt::OnDocumentHasImagesRequest. This method was doing: blink::WebVector<blink::WebElement> images; webview->mainFrame()->document().images(images); hasImages = !images.isEmpty(); which meant Blink would walk the entire document putting every <img> into a Vector, then it would copy that Vector into this WebVector all so this code could check if the Vector wasn't empty. Instead just use the NodeList version of getElementsByHTMLTagName, which we can already just call in this file with GetImgChild. This only walks until it finds the first <img> and doesn't need additional storage. Review URL: https://codereview.chromium.org/1220333011 Cr-Commit-Position: refs/heads/master@{#337920}
* Revert "SuppressLint dispatchMediaKeyEvent"paulmiller2015-07-083-1/+2
| | | | | | | | | | | | | This reverts b853e3b94ebc92a96132bbf6e79c47483c694b7d Lint is fatal since 8db283ac6beb49ad8032a8e6c65e4cc76db65ffd, so also point the linter to AndroidManifests with higher minSdkVersions. BUG=241521 Review URL: https://codereview.chromium.org/1192003007 Cr-Commit-Position: refs/heads/master@{#337861}
* Don't autofill credit cards on non-secure pagessigbjorn2015-07-082-0/+19
| | | | | | | | | | | | Instead of checking for scheme only when suggesting credit card autofills, ensure that the page is secure. Also add missing tests for storing credit cards (even when submitted on http). Review URL: https://codereview.chromium.org/1136473006 Cr-Commit-Position: refs/heads/master@{#337796}
* Adjust the text size using page scale informationsgurun2015-07-081-1/+4
| | | | | | | | | | | BUG=507815 The text size needs to be adjusted by the page scale factor. Further, fix an initialization bug. Review URL: https://codereview.chromium.org/1223843015 Cr-Commit-Position: refs/heads/master@{#337752}
* Fix Problems found by Errorproneraywilliams2015-07-079-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | 20 Files with Fixes 2 Files with Suppressions Some errors were suppressed as they appear to be deliberate Includes fixes for: [Finally] [PrimitiveArrayPassedToVarargsMethod] [DepAnn] [StaticAccessedFromInstance] [StringEquality] [CollectionIncompatibleType] [WaitNotInLoop] See http://errorprone.info/bugpatterns for information about these bug patterns BUG=485599 Review URL: https://codereview.chromium.org/1209413009 Cr-Commit-Position: refs/heads/master@{#337683}
* [Android WebView] Add test for setUserAgentString behaviourmnaganov2015-07-071-0/+39
| | | | | | | | | | | Add a test verifying that changing the UA string while loading a page causes WebView to reload it. BUG=315891 Review URL: https://codereview.chromium.org/1223953004 Cr-Commit-Position: refs/heads/master@{#337673}
* Update WebView proguard configuration.torne2015-07-071-65/+50
| | | | | | | | | | | | | Update the proguard configuration file for the WebView APK to make it reflect the current code. This does not re-enable actually running proguard on the APK and so will not have any effect by itself, but it appears to work with limited local testing. BUG=442348 Review URL: https://codereview.chromium.org/1218303002 Cr-Commit-Position: refs/heads/master@{#337585}
* Plumb a way to pass version info to Javasgurun2015-07-072-0/+11
| | | | | | | | BUG=507446 Review URL: https://codereview.chromium.org/1214853021 Cr-Commit-Position: refs/heads/master@{#337542}
* Rebaseline global-interface-listing-expected.txttimvolodine2015-07-061-0/+9
| | | | | | | | | | | This is due to crrev.com/1130113006. BUG=506603 TBR=torne@chromium.org Review URL: https://codereview.chromium.org/1220813012 Cr-Commit-Position: refs/heads/master@{#337396}
* android_webview: Replace usage of GetActiveEntry by GetLastCommittedEntry.tfarina2015-07-033-13/+14
| | | | | | | | | | | According to the bug crbug.com/273710 it can lead to security issues. BUG=273710 R=nasko@chromium.org Review URL: https://codereview.chromium.org/1223643002 Cr-Commit-Position: refs/heads/master@{#337315}
* Rebaseline global-interface-listing-expected.txttimvolodine2015-07-031-4/+4
| | | | | | | | | | This is due to https://codereview.chromium.org/1201193005 BUG=506603 Review URL: https://codereview.chromium.org/1222703002 Cr-Commit-Position: refs/heads/master@{#337308}
* Replace base::string16 with std::string for frame names.nasko2015-07-022-2/+2
| | | | | | | | | | This is a follow up from https://codereview.chromium.org/1141453003/ to ensure that frame names are using std::string on the Chromium side. The conversion from UTF16 to UTF8 happens in the renderer process when the data comes from Blink and from there on it flows through as UTF8 std::string. BUG=none Review URL: https://codereview.chromium.org/1217183002 Cr-Commit-Position: refs/heads/master@{#337251}
* Rebaseline global-interface-listing-expected.txttimvolodine2015-07-021-520/+0
| | | | | | | | | | | | | The current WebView test is failing on the L FYI bot. This is due to a change in blink https://codereview.chromium.org/1220793002, which eliminates JS builtins from the listing. BUG=506603 TBR=torne@chromium.org Review URL: https://codereview.chromium.org/1217503006 Cr-Commit-Position: refs/heads/master@{#337225}
* [android] Remove unpack library fallback.rmcilroy2015-07-022-3/+3
| | | | | | | | | | | | | The load library from APK configuration of Chrome is only going to be used on version of Lollipop onwards where there should be no need to trigger the unpack fallback. UMA shows no use of this fallback in the wild, so let's remove it. BUG=398425, 390618 Review URL: https://codereview.chromium.org/1216703003 Cr-Commit-Position: refs/heads/master@{#337222}
* Enable web store APIssgurun2015-07-011-0/+9
| | | | | | | | | | Enable web storage features to have a more complete webview test shell. BUG=b/19351071 Review URL: https://codereview.chromium.org/1218783008 Cr-Commit-Position: refs/heads/master@{#337067}
* [Android WebViewShell] Make WebViewLayoutTest runnable with test_runner.pytimvolodine2015-07-013-16/+86
| | | | | | | | | | | | | | | | Make it possible to run the instrumentation tests in WebViewLayoutTest using build/android/test_runner.py. This patch adds an .isolate file, modifies the gyp target settings and uses the standard paths for testing on the device. Also the apk now performs any necessary copying (of js-test.js) itself, making it possible to run the tests both locally and on the bots using the .isolate file. BUG=497861 Review URL: https://codereview.chromium.org/1215733002 Cr-Commit-Position: refs/heads/master@{#337040}
* Remove benm@ from OWNERSmnaganov2015-06-301-1/+0
| | | | | | | | | | | | | Ben no longer works on Chromium, so remove him to save time for people looking for owners. Replace benm@ with myself on components/web_contents_delegate_android. TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1210073011 Cr-Commit-Position: refs/heads/master@{#336840}
* Do not query AX tree if there is no navigation yetsgurun2015-06-303-3/+26
| | | | | | | | | | | | If AX tree is requested before a navigation, then the request is silently dropped since there is no renderer associated with the routing id yet. BUG=505023 Review URL: https://codereview.chromium.org/1221643005 Cr-Commit-Position: refs/heads/master@{#336694}
* aw: Make is_layer match offscreen_pre_rasterboliu2015-06-297-33/+28
| | | | | | | | | | | When in layer, use the webview size to make tiling decisions (memory and interect rect). This mostly matches offscreen_pre_raster behavior. BUG=505133 Review URL: https://codereview.chromium.org/1221533002 Cr-Commit-Position: refs/heads/master@{#336638}
* aw: Use setLayoutParams instead of OnLayoutChangeListenerboliu2015-06-293-17/+15
| | | | | | | | | | This is more efficient. BUG= Review URL: https://codereview.chromium.org/1213083002 Cr-Commit-Position: refs/heads/master@{#336573}
* Convert some base/prefs/ methods to scoped_ptr instead of bare ptrestade2015-06-262-6/+6
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1160403002 Cr-Commit-Position: refs/heads/master@{#336412}
* Handle passing null object to WebBackForwardListChromium constructorgsennton2015-06-261-1/+6
| | | | | | | | | | | | | | Passing null to WebBackForwardListChromium can occur if a WebView is destroyed with a pending callback and that callback calls WebViewChromium.copyBackForwardList. This is a short-term fix for this problem, a long term fix would be to make sure no callbacks are carried out after WebView is destroyed. BUG=498796 Review URL: https://codereview.chromium.org/1215763003 Cr-Commit-Position: refs/heads/master@{#336393}
* [Android WebViewShell] Add support for running (some) blink layout tests in ↵timvolodine2015-06-2610-0/+6748
| | | | | | | | | | | | | | | | | | | | WebViewShell. This patch does the following: - adds framework support for running a subset of blink layout tests in the webview shell - adds 2 sample tests, one of which tests the global interface exposed in webview - adds functionality to rebase the tests - adds a script to run the tests on an android device The testing works similarly to layout testing in blink in that a html file is loaded using webview which executes some JavaScript. The latter generates textual output and the result is compared against an expectations file. BUG=497861 Review URL: https://codereview.chromium.org/1161993008 Cr-Commit-Position: refs/heads/master@{#336361}
* Never look for locale pak files on disk when they are stored within the apkagrieve2015-06-251-0/+1
| | | | | | | | BUG=371610 Review URL: https://codereview.chromium.org/1184293003 Cr-Commit-Position: refs/heads/master@{#336248}
* Convert Android WebView to store locale .pak files as res/raw resourcesagrieve2015-06-257-67/+29
| | | | | | | | | | | | Motivation for this is to have webview be consistent with chrome in how it bundles these. It does also have the side-effect of improving the look-up time for LocaleDataPakExists. BUG=371610 Review URL: https://codereview.chromium.org/1193613002 Cr-Commit-Position: refs/heads/master@{#336237}
* Do not require explicit initialization of ResourceExtractoragrieve2015-06-242-12/+0
| | | | | | | | | | | | | | | It's used only for locale pack files now, so shouldn't require so much attention. This also removes the extraction args from ComponentsBrowserTestsApplication.java, which don't appear to be necessary BUG= Review URL: https://codereview.chromium.org/1181733004 Cr-Commit-Position: refs/heads/master@{#336020}
* Implement self-contained gpu data collection on Androidtobiasjs2015-06-241-0/+3
| | | | | | | | | | | | | | | | | | By removing the dependency of gpu data collection on gfx::GLSurface::InitializeOneOff() (and hence complete iniitalization of gl bindings and extensions), the initialization flow can be simplified and potentially delayed. This also fixes the incorrect behaviour of extension blacklisting in Android WebViews, where the decision regarding what to blacklist is only made after extensions are loaded and made available. BUG=462553,326295,499928 TBR=sievers for render_thread_impl Review URL: https://codereview.chromium.org/1172003002 Cr-Commit-Position: refs/heads/master@{#336015}
* Remove all the imports only needed for jni generator.aurimas2015-06-241-2/+0
| | | | | | | | | | | | - Enable checkstyle for unneeded imports. - Move VideoCaptureFormat to its own class. - Add java lang classes to jni_generator.py BUG=424792 Review URL: https://codereview.chromium.org/1205653004 Cr-Commit-Position: refs/heads/master@{#336014}
* Add more string_util functions to base namespace.brettw2015-06-242-8/+9
| | | | | | | | | | Moves ReplaceFirstSubstringAfterOffset. It also changes the find/replace arguments to be string pieces (normally these are constants). TBR=gauravsh@chromium.org for chromeos/network Review URL: https://codereview.chromium.org/1200393002 Cr-Commit-Position: refs/heads/master@{#335999}
* Add a flag showing whether the current request was ignored by a handlergsennton2015-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When converting to using a resource throttle to call shouldOverrideUrlLoading in WebView we need to know whether the current request was ignored because of shouldOverrideUrlLoading or something else. This is because we need to know when to post OnPageFinished. This is an initial CL that simply passes the flag where it needs to be -- the actual move to using a resource throttle will be added in a follow-up CL to make that CL more easily reviewable/updatable. The flag is passed down from WebURLLoaderImpl::Context::OnCompletedRequest in content/child/web_url_loader_impl.cc all the way to AwWebContentsObserver.didFailLoad so that we can make the right decision there. A large part of the flag-passing is handled through adding a flag to WebURLError and ResourceError in Blink: https://codereview.chromium.org/1178273007/ TBR=jochen@chromium.org,fsamuel@chromium.org BUG=325351 Review URL: https://codereview.chromium.org/1194383003 Cr-Commit-Position: refs/heads/master@{#335974}
* Remove NetworkDelegate::OnCanThrottleRequestxunjieli2015-06-242-6/+0
| | | | | | | | | | | | | This CL removes NetworkDelegate::OnCanThrottleRequest which is no longer relevant and can be deleted. TBR=startmorgan@chromium.org TBR=davidben@chromium.org BUG=500680 Review URL: https://codereview.chromium.org/1201013002 Cr-Commit-Position: refs/heads/master@{#335916}
* Replace some Tokenize calls with SplitString.brettw2015-06-241-2/+4
| | | | | | | | | | Tokenize is now a legacy wrapper around a particular variant of SplitString call. I want to remove the Tokenize wrappers. This patch uses the StringPiece version in obvious cases which saves allocations, and in many places removes the vector temporary in preferences to a range-based for loop. Review URL: https://codereview.chromium.org/1197243004 Cr-Commit-Position: refs/heads/master@{#335856}
* Make it possible to synthesize a viewport scrollhush2015-06-231-1/+1
| | | | | | | | | | | | | | | | | When targetViewport is true, skip the hit test and always scroll the viewport layer. This is to support the WebView#flingScroll API, which has been implemented to always target at viewport scroll layer. Accompanying blink change that adds 'targetViewport': https://codereview.chromium.org/1187633003/ BUG=493765 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1189603004 Cr-Commit-Position: refs/heads/master@{#335750}
* Add MIDI SYSEX permission request to WebViewmichaelbai2015-06-238-3/+50
| | | | | | | | BUG=339767 Review URL: https://codereview.chromium.org/1182323008 Cr-Commit-Position: refs/heads/master@{#335678}
* Use scoped_ptr for NavigationEntries.avi2015-06-231-1/+1
| | | | | | | | | | | | | | | | BUG=none TEST=none NOTRY=true Committed: https://crrev.com/2fc587ca7953483ebd9e8d71636d2a1b28a59c06 Cr-Commit-Position: refs/heads/master@{#335167} Reverted: https://crrev.com/01fd50b1484c52d89f4cee8c16f42ab1f6afa960 Cr-Revert-Position: refs/heads/master@{#335211} Review URL: https://codereview.chromium.org/1191893009 Cr-Commit-Position: refs/heads/master@{#335673}
* Revert of Implement self-contained gpu data collection on Android (patchset ↵erikwright2015-06-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #12 id:220001 of https://codereview.chromium.org/1172003002/) Reason for revert: http://crbug.com/503615 This CL is the only likely-looking candidate. Reverting to see if it resolves the test failures. Original issue's description: > Implement self-contained gpu data collection on Android > > By removing the dependency of gpu data collection on > gfx::GLSurface::InitializeOneOff() (and hence complete iniitalization of > gl bindings and extensions), the initialization flow can be simplified > and potentially delayed. > > This also fixes the incorrect behaviour of extension blacklisting in > Android WebViews, where the decision regarding what to blacklist is only > made after extensions are loaded and made available. > > BUG=462553,32629,499928 > > Committed: https://crrev.com/2a111821c550ff0237c97fd4a6caf01175f08af6 > Cr-Commit-Position: refs/heads/master@{#335617} TBR=sievers@chromium.org,boliu@chromium.org,tobiasjs@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=462553,32629,499928 Review URL: https://codereview.chromium.org/1193333015 Cr-Commit-Position: refs/heads/master@{#335663}
* Implement self-contained gpu data collection on Androidtobiasjs2015-06-231-0/+3
| | | | | | | | | | | | | | | | | By removing the dependency of gpu data collection on gfx::GLSurface::InitializeOneOff() (and hence complete iniitalization of gl bindings and extensions), the initialization flow can be simplified and potentially delayed. This also fixes the incorrect behaviour of extension blacklisting in Android WebViews, where the decision regarding what to blacklist is only made after extensions are loaded and made available. BUG=462553,32629,499928 Review URL: https://codereview.chromium.org/1172003002 Cr-Commit-Position: refs/heads/master@{#335617}
* Revert "Revert "Android: Store language .pak files in res/raw rather than ↵agrieve2015-06-222-3/+2
| | | | | | | | | | | | | | assets"" This reverts commit bd0057ca4ca5990173e099f5cdd5219c6ed72fd5. Also adds a "setMandatoryPaksToExtract" overload to prevent breakage. BUG=371610 TBR=Yaron, Torne, cjhopman, Jaekyun Seok, James Hawkins, gunsch, newt Review URL: https://codereview.chromium.org/1198193006 Cr-Commit-Position: refs/heads/master@{#335538}
* [Android WebView] Convert some more callbacks into embedder to be asyncmnaganov2015-06-224-36/+116
| | | | | | | | | | | | | | | | | | Callbacks in WebContentsObserver are called synchronously from Navigator (via WebContents), thus it is safer to post them to embedders asynchronously. OnFormResubmission is called synchronously from inside NavigationControllerImpl::ReloadInternal. Fix tests that started failing because they were relying on callbacks being synchronous. BUG=495234 Review URL: https://codereview.chromium.org/1192933003 Cr-Commit-Position: refs/heads/master@{#335507}
* Revert "Android: Store language .pak files in res/raw rather than assets"qinmin2015-06-202-2/+3
| | | | | | | | | | | This reverts commit f30e04470453ccd7e6a9abf586185b991d174902. This change breaks android TOT bot TBR=yfriedman@chromium.org,torne@chromium.org,cjhopman@chromium.org,jaekyun@chromium.org,jhawkins@chromium.org,gunsch@chromium.org,newt@chromium.org,agrieve@chromium.org BUG=371610 Review URL: https://codereview.chromium.org/1200583002 Cr-Commit-Position: refs/heads/master@{#335432}
* Add support for client referrer and headers to Custom Tabsianwen2015-06-191-1/+2
| | | | | | | | | | | | | | | Chrome on android already has logics to handle referer and extra http headers sent from client; however custom tab does not support it yet. This CL fixes it. One remaining work would be letting mayLaunchUrl() in CustomTabConnectionService parse the referrer as well. BUG=501617 Review URL: https://codereview.chromium.org/1177983008 Cr-Commit-Position: refs/heads/master@{#335377}
* Make lint fail builds.aurimas2015-06-193-8/+3
| | | | | | | | | | | | Fix and suppress a bunch of lint warnings to be able to enable lint build failing. TBR=boliu@chromium.org,pauljensen@chromium.org,tedchoc@chromium.org,lambroslambrou@chromium.org,damienv@chromium.org BUG=501471,241521,501591,501593,501900,502030 Review URL: https://codereview.chromium.org/1190103002 Cr-Commit-Position: refs/heads/master@{#335371}