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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 554393008: [Athena] Simple pull to refresh implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 target->SetTransform(transform); 1295 target->SetTransform(transform);
1296 UpdateOverscrollWindowBrightness(delta_x); 1296 UpdateOverscrollWindowBrightness(delta_x);
1297 } 1297 }
1298 1298
1299 OverscrollUpdateForWebContentsDelegate(translate.y()); 1299 OverscrollUpdateForWebContentsDelegate(translate.y());
1300 return !translate.IsZero(); 1300 return !translate.IsZero();
1301 } 1301 }
1302 1302
1303 void WebContentsViewAura::OnOverscrollComplete(OverscrollMode mode) { 1303 void WebContentsViewAura::OnOverscrollComplete(OverscrollMode mode) {
1304 UMA_HISTOGRAM_ENUMERATION("Overscroll.Completed", mode, OVERSCROLL_COUNT); 1304 UMA_HISTOGRAM_ENUMERATION("Overscroll.Completed", mode, OVERSCROLL_COUNT);
1305 OverscrollUpdateForWebContentsDelegate(0); 1305 if (web_contents_->GetDelegate() && IsScrollEndEffectEnabled())
1306 web_contents_->GetDelegate()->OverscrollComplete();
sadrul 2014/09/11 04:33:14 Since we send updates to the WebContentsDelegate o
pkotwicz 2014/09/11 22:51:40 I have changed the code to only send updates when
1306 NavigationControllerImpl& controller = web_contents_->GetController(); 1307 NavigationControllerImpl& controller = web_contents_->GetController();
1307 if (ShouldNavigateForward(controller, mode) || 1308 if (ShouldNavigateForward(controller, mode) ||
1308 ShouldNavigateBack(controller, mode)) { 1309 ShouldNavigateBack(controller, mode)) {
1309 CompleteOverscrollNavigation(mode); 1310 CompleteOverscrollNavigation(mode);
1310 return; 1311 return;
1311 } 1312 }
1312 1313
1313 ResetOverscrollTransform(); 1314 ResetOverscrollTransform();
1314 } 1315 }
1315 1316
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 if (visible) { 1618 if (visible) {
1618 if (!web_contents_->should_normally_be_visible()) 1619 if (!web_contents_->should_normally_be_visible())
1619 web_contents_->WasShown(); 1620 web_contents_->WasShown();
1620 } else { 1621 } else {
1621 if (web_contents_->should_normally_be_visible()) 1622 if (web_contents_->should_normally_be_visible())
1622 web_contents_->WasHidden(); 1623 web_contents_->WasHidden();
1623 } 1624 }
1624 } 1625 }
1625 1626
1626 } // namespace content 1627 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698