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

Unified Diff: cc/layers/solid_color_scrollbar_layer_impl.h

Issue 18341009: Refactor cc scrollbar layers to separate solid-color vs desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address tfarina@'s comments. Created 7 years, 5 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_impl.h
diff --git a/cc/layers/solid_color_scrollbar_layer_impl.h b/cc/layers/solid_color_scrollbar_layer_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..caa692fbd1d0dedd12fd86a7476a34a8606bb0aa
--- /dev/null
+++ b/cc/layers/solid_color_scrollbar_layer_impl.h
@@ -0,0 +1,47 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_
+#define CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_
+
+#include "cc/base/cc_export.h"
+#include "cc/layers/scrollbar_layer_impl_base.h"
+
+namespace cc {
+
+class SolidColorScrollbarLayerImpl : public ScrollbarLayerImplBase {
+ public:
+ static scoped_ptr<SolidColorScrollbarLayerImpl> Create(
+ LayerTreeImpl* tree_impl,
+ int id,
+ ScrollbarOrientation orientation,
+ int thumb_thickness,
+ SkColor color);
+ virtual ~SolidColorScrollbarLayerImpl();
+
+ virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
+ OVERRIDE;
+ virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
+
+ virtual void AppendQuads(QuadSink* quad_sink,
+ AppendQuadsData* append_quads_data) OVERRIDE;
+
+
+ virtual gfx::Rect ComputeThumbQuadRect() const OVERRIDE;
+
+ protected:
+ SolidColorScrollbarLayerImpl(LayerTreeImpl* tree_impl,
+ int id,
+ ScrollbarOrientation orientation,
+ int thumb_thickness,
+ SkColor color);
+
+ private:
+ int thumb_thickness_;
+ SkColor color_;
+};
+
+} // namespace cc
+
+#endif // CC_LAYERS_SOLID_COLOR_SCROLLBAR_LAYER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698