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

Unified Diff: cc/layers/solid_color_scrollbar_layer.h

Issue 2816063003: Replace layer id with Element id for tracking scrollbar animation controllers (Closed)
Patch Set: Address reviewer comments, pull element_id.h change to another patch Created 3 years, 8 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: cc/layers/solid_color_scrollbar_layer.h
diff --git a/cc/layers/solid_color_scrollbar_layer.h b/cc/layers/solid_color_scrollbar_layer.h
index 319674c22ad4f2c414144d4220eb90ea73118395..814851c9333d2ae078ff8f1a4673b50803b091c6 100644
--- a/cc/layers/solid_color_scrollbar_layer.h
+++ b/cc/layers/solid_color_scrollbar_layer.h
@@ -22,7 +22,8 @@ class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
int thumb_thickness,
int track_start,
bool is_left_side_vertical_scrollbar,
- int scroll_layer_id);
+ int scroll_layer_id,
+ ElementId scroll_element_id);
// Layer overrides.
bool OpacityCanAnimateOnImplThread() const override;
@@ -35,8 +36,9 @@ class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
void SetNeedsDisplayRect(const gfx::Rect& rect) override;
// ScrollbarLayerInterface
- int ScrollLayerId() const override;
- void SetScrollLayer(int layer_id) override;
+ ElementId scroll_element_id() const override;
+ // TODO(pdr): Remove layer_id and refactor scrollbars to just use element ids.
+ void SetScrollInfo(int layer_id, ElementId element_id) override;
ScrollbarOrientation orientation() const override;
@@ -57,7 +59,8 @@ class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
int thumb_thickness,
int track_start,
bool is_left_side_vertical_scrollbar,
- int scroll_layer_id);
+ int scroll_layer_id,
+ ElementId scroll_element_id);
~SolidColorScrollbarLayer() override;
private:
@@ -69,10 +72,12 @@ class CC_EXPORT SolidColorScrollbarLayer : public ScrollbarLayerInterface,
int thumb_thickness,
int track_start,
bool is_left_side_vertical_scrollbar,
- int scroll_layer_id);
+ int scroll_layer_id,
+ ElementId scroll_element_id);
~SolidColorScrollbarLayerInputs();
int scroll_layer_id;
+ ElementId scroll_element_id;
ScrollbarOrientation orientation;
int thumb_thickness;
int track_start;

Powered by Google App Engine
This is Rietveld 408576698