Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / android / compositor / layer / reader_mode_layer.h
blob940dd223ff9eff43116e64b0fb2bed62c5d4d1bc
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"
12 namespace cc {
13 class Layer;
14 class NinePatchLayer;
15 class SolidColorLayer;
16 class UIResourceLayer;
19 namespace content {
20 class ContentViewCore;
23 namespace ui {
24 class ResourceManager;
27 namespace chrome {
28 namespace android {
30 class ReaderModeLayer : public Layer {
31 public:
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,
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);
48 scoped_refptr<cc::Layer> layer() override;
50 protected:
51 explicit ReaderModeLayer(ui::ResourceManager* resource_manager);
52 ~ReaderModeLayer() override;
54 private:
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
66 } // namespace chrome
68 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_READER_MODE_LAYER_H_