| 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_CONTENT_LAYER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTENT_LAYER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTENT_LAYER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTENT_LAYER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/output/filter_operations.h" | 10 #include "cc/output/filter_operations.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 float content_alpha_override, | 38 float content_alpha_override, |
| 39 float saturation, | 39 float saturation, |
| 40 float brightness, | 40 float brightness, |
| 41 const gfx::Rect& desired_bounds, | 41 const gfx::Rect& desired_bounds, |
| 42 const gfx::Size& content_size); | 42 const gfx::Size& content_size); |
| 43 bool ShowingLiveLayer() { return !static_attached_ && content_attached_; } | 43 bool ShowingLiveLayer() { return !static_attached_ && content_attached_; } |
| 44 gfx::Size GetContentSize(); | 44 gfx::Size GetContentSize(); |
| 45 | 45 |
| 46 scoped_refptr<cc::Layer> layer() override; | 46 scoped_refptr<cc::Layer> layer() override; |
| 47 | 47 |
| 48 static const cc::LayerSettings& ContentLayerSettings(); |
| 49 static void SetContentLayerSettings(const cc::LayerSettings& settings); |
| 50 |
| 48 protected: | 51 protected: |
| 49 explicit ContentLayer(TabContentManager* tab_content_manager); | 52 explicit ContentLayer(TabContentManager* tab_content_manager); |
| 50 ~ContentLayer() override; | 53 ~ContentLayer() override; |
| 51 | 54 |
| 52 private: | 55 private: |
| 53 void SetContentLayer(scoped_refptr<cc::Layer> layer); | 56 void SetContentLayer(scoped_refptr<cc::Layer> layer); |
| 54 void SetStaticLayer(scoped_refptr<ThumbnailLayer> layer); | 57 void SetStaticLayer(scoped_refptr<ThumbnailLayer> layer); |
| 55 void ClipContentLayer(scoped_refptr<cc::Layer> content_layer, | 58 void ClipContentLayer(scoped_refptr<cc::Layer> content_layer, |
| 56 gfx::Rect clipping, | 59 gfx::Rect clipping, |
| 57 gfx::Size content_size); | 60 gfx::Size content_size); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 68 | 71 |
| 69 TabContentManager* tab_content_manager_; | 72 TabContentManager* tab_content_manager_; |
| 70 | 73 |
| 71 DISALLOW_COPY_AND_ASSIGN(ContentLayer); | 74 DISALLOW_COPY_AND_ASSIGN(ContentLayer); |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 } // namespace android | 77 } // namespace android |
| 75 } // namespace chrome | 78 } // namespace chrome |
| 76 | 79 |
| 77 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTENT_LAYER_H_ | 80 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CONTENT_LAYER_H_ |
| OLD | NEW |