Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: content/browser/web_contents/navigation_controller_impl.cc

Issue 12036074: overscroll: Enable overscroll navigation by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index e5b34b5e0dc5ed468af80f006b04ef9baa26cb70..a4ec35fb626b3b13b14125f0b7c86edc4d305d79 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -479,8 +479,8 @@ int NavigationControllerImpl::GetIndexForOffset(int offset) const {
}
void NavigationControllerImpl::TakeScreenshot() {
- static bool overscroll_enabled = CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kEnableOverscrollHistoryNavigation);
+ static bool overscroll_enabled = !CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableOverscrollHistoryNavigation);
if (!overscroll_enabled)
return;
@@ -490,6 +490,10 @@ void NavigationControllerImpl::TakeScreenshot() {
return;
RenderViewHost* render_view_host = web_contents_->GetRenderViewHost();
+ if (!static_cast<RenderViewHostImpl*>
+ (render_view_host)->overscroll_controller()) {
+ return;
+ }
content::RenderWidgetHostView* view = render_view_host->GetView();
if (!view)
return;
@@ -527,8 +531,6 @@ void NavigationControllerImpl::OnScreenshotTaken(
}
if (!success) {
- LOG(ERROR) << "Taking snapshot was unsuccessful for "
- << unique_id;
ClearScreenshot(entry);
return;
}

Powered by Google App Engine
This is Rietveld 408576698