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

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

Issue 52263006: Put vertical overscroll behind kScrollEndEffect flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index bc7ee3ada1c36fdf0dde2e5d033d022ab7f566f8..a90580c694fe7b92b383072a67bdc5901f9cae49 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -33,7 +33,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/browser/web_drag_dest_delegate.h"
-#include "content/public/common/content_switches.h"
+#include "content/public/common/content_switches_util.h"
#include "content/public/common/drop_data.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -75,11 +75,6 @@ WebContentsViewPort* CreateWebContentsView(
namespace {
-bool IsScrollEndEffectEnabled() {
- return CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kScrollEndEffect) == "1";
-}
-
bool ShouldNavigateForward(const NavigationController& controller,
OverscrollMode mode) {
return mode == (base::i18n::IsRTL() ? OVERSCROLL_EAST : OVERSCROLL_WEST) &&
@@ -1052,7 +1047,7 @@ void WebContentsViewAura::AttachTouchEditableToRenderView() {
}
void WebContentsViewAura::OverscrollUpdateForWebContentsDelegate(int delta_y) {
- if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled())
+ if (web_contents_->GetDelegate() && switches::IsScrollEndEffectEnabled())
web_contents_->GetDelegate()->OverscrollUpdate(delta_y);
}

Powered by Google App Engine
This is Rietveld 408576698