Commit 61d5e4df authored by Bo Liu's avatar Bo Liu Committed by Commit Bot

weblayer: Use mobile fling curve on android

Do this by changing the default implementation to true for OS_ANDROID.
This also allows removing the android webview override.

Bug: 1038894
Change-Id: I1be3c680a32116bc8867958d85f89ad5302a525d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2006208
Commit-Queue: Bo <boliu@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Auto-Submit: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732842}
parent 23a6b526
......@@ -405,10 +405,6 @@ bool AwContentBrowserClient::IsExplicitNavigation(
return ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED);
}
bool AwContentBrowserClient::ShouldUseMobileFlingCurve() {
return true;
}
bool AwContentBrowserClient::IsHandledURL(const GURL& url) {
if (!url.is_valid()) {
// We handle error cases.
......
......@@ -71,7 +71,6 @@ class AwContentBrowserClient : public content::ContentBrowserClient {
content::WebContents* web_contents) override;
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
bool IsExplicitNavigation(ui::PageTransition transition) override;
bool ShouldUseMobileFlingCurve() override;
bool IsHandledURL(const GURL& url) override;
bool ForceSniffingFileUrlsForHtml() override;
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
......
......@@ -233,7 +233,7 @@ public class ContentViewScrollingTest {
int velocity = (int) (1000 * deviceScaleFactor);
// Expected total fling distance calculated by FlingCurve with initial
// velocity 1000.
int expected_dist = (int) (180 * deviceScaleFactor);
int expected_dist = (int) (194 * deviceScaleFactor);
// Vertical fling to lower-left.
fling(0, -velocity);
......
......@@ -102,7 +102,11 @@ bool ContentBrowserClient::IsExplicitNavigation(ui::PageTransition transition) {
}
bool ContentBrowserClient::ShouldUseMobileFlingCurve() {
#if defined(OS_ANDROID)
return true;
#else
return false;
#endif
}
bool ContentBrowserClient::ShouldUseProcessPerSite(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment