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

Unified Diff: cc/layers/viewport.cc

Issue 2443613002: Rename classes related to top controls (Closed)
Patch Set: fix test Created 4 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
« no previous file with comments | « cc/layers/viewport.h ('k') | cc/proto/layer_tree.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/viewport.cc
diff --git a/cc/layers/viewport.cc b/cc/layers/viewport.cc
index dcfd692d18d3099be00ecf85d9db73fb7a671e19..844703f231aec679291552e80999f3e3f94f34a4 100644
--- a/cc/layers/viewport.cc
+++ b/cc/layers/viewport.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/memory/ptr_util.h"
-#include "cc/input/top_controls_manager.h"
+#include "cc/input/browser_controls_offset_manager.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/scroll_node.h"
@@ -42,8 +42,8 @@ Viewport::ScrollResult Viewport::ScrollBy(const gfx::Vector2dF& delta,
gfx::Vector2dF content_delta = delta;
- if (affect_top_controls && ShouldTopControlsConsumeScroll(delta))
- content_delta -= ScrollTopControls(delta);
+ if (affect_top_controls && ShouldBrowserControlsConsumeScroll(delta))
+ content_delta -= ScrollBrowserControls(delta);
gfx::Vector2dF pending_content_delta = content_delta;
@@ -198,16 +198,16 @@ LayerImpl* Viewport::MainScrollLayer() const {
return OuterScrollLayer();
}
-gfx::Vector2dF Viewport::ScrollTopControls(const gfx::Vector2dF& delta) {
+gfx::Vector2dF Viewport::ScrollBrowserControls(const gfx::Vector2dF& delta) {
gfx::Vector2dF excess_delta =
- host_impl_->top_controls_manager()->ScrollBy(delta);
+ host_impl_->browser_controls_manager()->ScrollBy(delta);
return delta - excess_delta;
}
-bool Viewport::ShouldTopControlsConsumeScroll(
+bool Viewport::ShouldBrowserControlsConsumeScroll(
const gfx::Vector2dF& scroll_delta) const {
- // Always consume if it's in the direction to show the top controls.
+ // Always consume if it's in the direction to show the browser controls.
if (scroll_delta.y() < 0)
return true;
« no previous file with comments | « cc/layers/viewport.h ('k') | cc/proto/layer_tree.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698