| Index: content/browser/web_contents/aura/window_slider.cc
|
| diff --git a/content/browser/web_contents/aura/window_slider.cc b/content/browser/web_contents/aura/window_slider.cc
|
| index 8b94cd08a867ee2e118c718031a24d23e15b32c9..7afd32dd3d7a345c4f9881aede1d981458493565 100644
|
| --- a/content/browser/web_contents/aura/window_slider.cc
|
| +++ b/content/browser/web_contents/aura/window_slider.cc
|
| @@ -58,8 +58,8 @@ WindowSlider::WindowSlider(Delegate* delegate,
|
| owner_(owner),
|
| delta_x_(0.f),
|
| weak_factory_(this),
|
| - min_start_threshold_(content::GetOverscrollConfig(
|
| - content::OVERSCROLL_CONFIG_MIN_THRESHOLD_START)),
|
| + horiz_start_threshold_(content::GetOverscrollConfig(
|
| + content::OVERSCROLL_CONFIG_HORIZ_THRESHOLD_START)),
|
| complete_threshold_(content::GetOverscrollConfig(
|
| content::OVERSCROLL_CONFIG_HORIZ_THRESHOLD_COMPLETE)) {
|
| event_window_->AddPreTargetHandler(this);
|
| @@ -89,7 +89,7 @@ void WindowSlider::ChangeOwner(aura::Window* new_owner) {
|
| }
|
|
|
| bool WindowSlider::IsSlideInProgress() const {
|
| - return fabs(delta_x_) >= min_start_threshold_ || slider_.get() ||
|
| + return fabs(delta_x_) >= horiz_start_threshold_ || slider_.get() ||
|
| weak_factory_.HasWeakPtrs();
|
| }
|
|
|
| @@ -107,7 +107,7 @@ void WindowSlider::SetupSliderLayer() {
|
| void WindowSlider::UpdateForScroll(float x_offset, float y_offset) {
|
| float old_delta = delta_x_;
|
| delta_x_ += x_offset;
|
| - if (fabs(delta_x_) < min_start_threshold_ && !slider_.get())
|
| + if (fabs(delta_x_) < horiz_start_threshold_ && !slider_.get())
|
| return;
|
|
|
| if ((old_delta < 0 && delta_x_ > 0) ||
|
| @@ -127,13 +127,13 @@ void WindowSlider::UpdateForScroll(float x_offset, float y_offset) {
|
| SetupSliderLayer();
|
| }
|
|
|
| - if (delta_x_ <= -min_start_threshold_) {
|
| + if (delta_x_ <= -horiz_start_threshold_) {
|
| translate = owner_->bounds().width() +
|
| - std::max(delta_x_ + min_start_threshold_,
|
| + std::max(delta_x_ + horiz_start_threshold_,
|
| static_cast<float>(-owner_->bounds().width()));
|
| translate_layer = slider_.get();
|
| - } else if (delta_x_ >= min_start_threshold_) {
|
| - translate = std::min(delta_x_ - min_start_threshold_,
|
| + } else if (delta_x_ >= horiz_start_threshold_) {
|
| + translate = std::min(delta_x_ - horiz_start_threshold_,
|
| static_cast<float>(owner_->bounds().width()));
|
| translate_layer = owner_->layer();
|
| } else {
|
| @@ -153,7 +153,7 @@ void WindowSlider::UpdateForFling(float x_velocity, float y_velocity) {
|
| return;
|
|
|
| int width = owner_->bounds().width();
|
| - float ratio = (fabs(delta_x_) - min_start_threshold_) / width;
|
| + float ratio = (fabs(delta_x_) - horiz_start_threshold_) / width;
|
| if (ratio < complete_threshold_) {
|
| ResetScroll();
|
| return;
|
|
|