OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/android/compositor/layer/layer.h" |
| 11 |
| 12 namespace cc { |
| 13 class Layer; |
| 14 class NinePatchLayer; |
| 15 class SolidColorLayer; |
| 16 class UIResourceLayer; |
| 17 } |
| 18 |
| 19 namespace content { |
| 20 class ContentViewCore; |
| 21 } |
| 22 |
| 23 namespace ui { |
| 24 class ResourceManager; |
| 25 } |
| 26 |
| 27 namespace chrome { |
| 28 namespace android { |
| 29 |
| 30 class ReaderModeLayer : public Layer { |
| 31 public: |
| 32 static scoped_refptr<ReaderModeLayer> Create( |
| 33 ui::ResourceManager* resource_manager); |
| 34 |
| 35 void SetProperties(int panel_background_resource_id, |
| 36 int panel_text_resource_id, |
| 37 content::ContentViewCore* reader_mode_content_view_core, |
| 38 float panel_y, |
| 39 float panel_width, |
| 40 float panel_margin_top, |
| 41 float panel_height, |
| 42 float distilled_y, |
| 43 float distilled_height, |
| 44 float x, |
| 45 float panel_text_opacity, |
| 46 int header_background_color); |
| 47 |
| 48 scoped_refptr<cc::Layer> layer() override; |
| 49 |
| 50 protected: |
| 51 explicit ReaderModeLayer(ui::ResourceManager* resource_manager); |
| 52 ~ReaderModeLayer() override; |
| 53 |
| 54 private: |
| 55 ui::ResourceManager* resource_manager_; |
| 56 |
| 57 scoped_refptr<cc::Layer> layer_; |
| 58 scoped_refptr<cc::NinePatchLayer> panel_background_; |
| 59 scoped_refptr<cc::UIResourceLayer> panel_text_; |
| 60 scoped_refptr<cc::NinePatchLayer> content_shadow_; |
| 61 scoped_refptr<cc::SolidColorLayer> content_solid_; |
| 62 scoped_refptr<cc::Layer> content_view_container_; |
| 63 }; |
| 64 |
| 65 } // namespace android |
| 66 } // namespace chrome |
| 67 |
| 68 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_ |
OLD | NEW |