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.
5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/android/compositor/layer/layer.h"
15 class SolidColorLayer
;
16 class UIResourceLayer
;
20 class ContentViewCore
;
24 class ResourceManager
;
30 class ReaderModeLayer
: public Layer
{
32 static scoped_refptr
<ReaderModeLayer
> Create(
33 ui::ResourceManager
* resource_manager
);
35 void SetProperties(int panel_background_resource_id
,
36 int panel_text_resource_id
,
37 content::ContentViewCore
* reader_mode_content_view_core
,
40 float panel_margin_top
,
43 float distilled_height
,
45 float panel_text_opacity
,
46 int header_background_color
);
48 scoped_refptr
<cc::Layer
> layer() override
;
51 explicit ReaderModeLayer(ui::ResourceManager
* resource_manager
);
52 ~ReaderModeLayer() override
;
55 ui::ResourceManager
* resource_manager_
;
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_
;
65 } // namespace android
68 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_