Index: cc/layers/scrollbar_layer_base.h |
diff --git a/cc/layers/scrollbar_layer_base.h b/cc/layers/scrollbar_layer_base.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..507caea5e7030d6bebe093775de47d51b3fbf941 |
--- /dev/null |
+++ b/cc/layers/scrollbar_layer_base.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2013 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_SCROLLBAR_LAYER_BASE_H_ |
+#define CC_LAYERS_SCROLLBAR_LAYER_BASE_H_ |
+ |
+#include "cc/input/scrollbar.h" |
+ |
+namespace cc { |
+ |
+class Layer; |
+ |
+class ScrollbarLayerBase { |
+ public: |
+ int scroll_layer_id() const { return scroll_layer_id_; } |
+ virtual void SetScrollLayerId(int id) = 0; |
+ |
+ ScrollbarOrientation orientation() const { return orientation_; } |
+ |
+ protected: |
+ ScrollbarLayerBase(int scroll_layer_id, |
+ ScrollbarOrientation orientation) |
+ : scroll_layer_id_(scroll_layer_id), |
+ orientation_(orientation) {} |
+ virtual ~ScrollbarLayerBase() {} |
+ |
+ // This member is set through the derived classes. |
+ int scroll_layer_id_; |
+ |
+ private: |
+ ScrollbarOrientation orientation_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ScrollbarLayerBase); |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_LAYERS_SCROLLBAR_LAYER_BASE_H_ |