Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / android / compositor / layer / toolbar_layer.h
blobe15ecfe45e272b49560f7e4b4eccf8d7b88ed32e
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TOOLBAR_LAYER_H_
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TOOLBAR_LAYER_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/android/compositor/layer/layer.h"
12 #include "ui/android/resources/resource_manager.h"
14 namespace cc {
15 class Layer;
16 class SolidColorLayer;
17 class UIResourceLayer;
20 namespace chrome {
21 namespace android {
23 class ToolbarLayer : public Layer {
24 public:
25 static scoped_refptr<ToolbarLayer> Create();
27 // Implements Layer
28 scoped_refptr<cc::Layer> layer() override;
30 void PushResource(ui::ResourceManager::Resource* resource,
31 bool anonymize,
32 int toolbar_textbox_background_color,
33 bool show_debug,
34 float brightness);
36 void UpdateProgressBar(int progress_bar_x,
37 int progress_bar_y,
38 int progress_bar_width,
39 int progress_bar_height,
40 int progress_bar_color,
41 int progress_bar_background_x,
42 int progress_bar_background_y,
43 int progress_bar_background_width,
44 int progress_bar_background_height,
45 int progress_bar_background_color);
47 protected:
48 ToolbarLayer();
49 ~ToolbarLayer() override;
51 private:
52 scoped_refptr<cc::Layer> layer_;
53 scoped_refptr<cc::UIResourceLayer> bitmap_layer_;
54 scoped_refptr<cc::SolidColorLayer> progress_bar_layer_;
55 scoped_refptr<cc::SolidColorLayer> progress_bar_background_layer_;
56 scoped_refptr<cc::SolidColorLayer> anonymize_layer_;
57 scoped_refptr<cc::SolidColorLayer> debug_layer_;
58 float brightness_;
60 DISALLOW_COPY_AND_ASSIGN(ToolbarLayer);
63 } // namespace android
64 } // namespace chrome
66 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TOOLBAR_LAYER_H_