OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_LAYER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_LAYER_H_ |
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_LAYER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_LAYER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "cc/layers/layer.h" | 11 #include "cc/layers/layer.h" |
12 #include "cc/output/filter_operations.h" | 12 #include "cc/output/filter_operations.h" |
13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
14 | 14 |
15 namespace cc { | |
16 class LayerSettings; | |
17 } | |
18 | |
19 namespace chrome { | 15 namespace chrome { |
20 namespace android { | 16 namespace android { |
21 | 17 |
22 // A simple wrapper for cc::Layer. You can override this to contain | 18 // A simple wrapper for cc::Layer. You can override this to contain |
23 // layers and add functionalities to it. | 19 // layers and add functionalities to it. |
24 class Layer : public base::RefCounted<Layer> { | 20 class Layer : public base::RefCounted<Layer> { |
25 public: | 21 public: |
26 virtual scoped_refptr<cc::Layer> layer() = 0; | 22 virtual scoped_refptr<cc::Layer> layer() = 0; |
27 | 23 |
28 protected: | 24 protected: |
29 Layer() {} | 25 Layer() {} |
30 virtual ~Layer() {} | 26 virtual ~Layer() {} |
31 | 27 |
32 private: | 28 private: |
33 friend class base::RefCounted<Layer>; | 29 friend class base::RefCounted<Layer>; |
34 | 30 |
35 DISALLOW_COPY_AND_ASSIGN(Layer); | 31 DISALLOW_COPY_AND_ASSIGN(Layer); |
36 }; | 32 }; |
37 | 33 |
38 } // namespace android | 34 } // namespace android |
39 } // namespace chrome | 35 } // namespace chrome |
40 | 36 |
41 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_LAYER_H_ | 37 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_LAYER_H_ |
OLD | NEW |