Chromium Code Reviews| Index: content/browser/renderer_host/overscroll_controller.cc |
| diff --git a/content/browser/renderer_host/overscroll_controller.cc b/content/browser/renderer_host/overscroll_controller.cc |
| index 0ae3d3e25c3c9d5938e85d52c0149ebf4f3b8cb8..493c652eed2be1ccc1424409086538e49dbc121f 100644 |
| --- a/content/browser/renderer_host/overscroll_controller.cc |
| +++ b/content/browser/renderer_host/overscroll_controller.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "content/browser/renderer_host/overscroll_controller_delegate.h" |
| #include "content/public/browser/overscroll_configuration.h" |
| +#include "content/public/common/content_switches_util.h" |
| using WebKit::WebInputEvent; |
| @@ -300,6 +301,12 @@ void OverscrollController::ProcessOverscroll(float delta_x, |
| fabs(overscroll_delta_y_) > fabs(overscroll_delta_x_) * kMinRatio) |
| new_mode = overscroll_delta_y_ > 0.f ? OVERSCROLL_SOUTH : OVERSCROLL_NORTH; |
| + // The vertical oversrcoll currently does not have any UX effects other then |
| + // for the scroll end effect, so testing if it is enabled. |
| + if ((new_mode == OVERSCROLL_SOUTH || new_mode == OVERSCROLL_NORTH) && |
| + !switches::IsScrollEndEffectEnabled()) |
| + new_mode = OVERSCROLL_NONE; |
|
sadrul
2013/10/30 16:06:50
This should be a separate CL from the content_swit
rharrison
2013/10/30 18:16:26
Done.
|
| + |
| if (overscroll_mode_ == OVERSCROLL_NONE) |
| SetOverscrollMode(new_mode); |
| else if (new_mode != overscroll_mode_) |