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

Unified Diff: cc/layers/scrollbar_layer_base.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: Rebased patch as it's sat for a while. Created 7 years, 4 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/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_

Powered by Google App Engine
This is Rietveld 408576698