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_TAB_HANDLE_LAYER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_HANDLE_LAYER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/layers/nine_patch_layer.h" |
| 11 #include "cc/layers/solid_color_layer.h" |
| 12 #include "cc/layers/ui_resource_layer.h" |
| 13 #include "chrome/browser/android/compositor/layer/layer.h" |
| 14 #include "ui/android/resources/resource_manager.h" |
| 15 |
| 16 namespace cc { |
| 17 class Layer; |
| 18 class NinePatchLayer; |
| 19 } |
| 20 |
| 21 namespace ui { |
| 22 class ResourceManager; |
| 23 } |
| 24 |
| 25 namespace chrome { |
| 26 namespace android { |
| 27 |
| 28 class LayerTitleCache; |
| 29 |
| 30 class TabHandleLayer : public Layer { |
| 31 public: |
| 32 static scoped_refptr<TabHandleLayer> Create( |
| 33 LayerTitleCache* layer_title_cache); |
| 34 |
| 35 void SetProperties(int id, |
| 36 ui::ResourceManager::Resource* close_button_resource, |
| 37 ui::ResourceManager::Resource* tab_handle_resource, |
| 38 bool foreground, |
| 39 bool close_pressed, |
| 40 float toolbar_width, |
| 41 float x, |
| 42 float y, |
| 43 float width, |
| 44 float height, |
| 45 float content_offset_x, |
| 46 float close_button_alpha, |
| 47 bool is_loading, |
| 48 float spinner_rotation, |
| 49 float brightness, |
| 50 float border_opacity); |
| 51 scoped_refptr<cc::Layer> layer() override; |
| 52 |
| 53 protected: |
| 54 explicit TabHandleLayer(LayerTitleCache* layer_title_cache); |
| 55 ~TabHandleLayer() override; |
| 56 |
| 57 private: |
| 58 LayerTitleCache* layer_title_cache_; |
| 59 |
| 60 scoped_refptr<cc::Layer> layer_; |
| 61 scoped_refptr<cc::UIResourceLayer> close_button_; |
| 62 scoped_refptr<cc::NinePatchLayer> decoration_tab_; |
| 63 scoped_refptr<cc::SolidColorLayer> border_; |
| 64 scoped_refptr<cc::Layer> title_layer_; |
| 65 |
| 66 float brightness_; |
| 67 bool foreground_; |
| 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(TabHandleLayer); |
| 70 }; |
| 71 |
| 72 } // namespace android |
| 73 } // namespace chrome |
| 74 |
| 75 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_HANDLE_LAYER_H_ |
OLD | NEW |