| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 float brightness, | 81 float brightness, |
| 82 float close_btn_width, | 82 float close_btn_width, |
| 83 float static_to_view_blend, | 83 float static_to_view_blend, |
| 84 float content_width, | 84 float content_width, |
| 85 float content_height, | 85 float content_height, |
| 86 float view_width, | 86 float view_width, |
| 87 float view_height, | 87 float view_height, |
| 88 bool show_toolbar, | 88 bool show_toolbar, |
| 89 int default_theme_color, | 89 int default_theme_color, |
| 90 int toolbar_background_color, | 90 int toolbar_background_color, |
| 91 int default_close_button_color, |
| 91 int close_button_color, | 92 int close_button_color, |
| 92 bool anonymize_toolbar, | 93 bool anonymize_toolbar, |
| 93 int toolbar_textbox_resource_id, | 94 int toolbar_textbox_resource_id, |
| 94 int toolbar_textbox_background_color, | 95 int toolbar_textbox_background_color, |
| 95 float toolbar_textbox_alpha, | 96 float toolbar_textbox_alpha, |
| 96 float toolbar_alpha, | 97 float toolbar_alpha, |
| 97 float toolbar_y_offset, | 98 float toolbar_y_offset, |
| 98 float side_border_scale, | 99 float side_border_scale, |
| 99 bool attach_content, | 100 bool attach_content, |
| 100 bool inset_border); | 101 bool inset_border, |
| 102 bool title_layer_needs_update); |
| 101 | 103 |
| 102 bool is_incognito() const { return incognito_; } | 104 bool is_incognito() const { return incognito_; } |
| 103 | 105 |
| 104 scoped_refptr<cc::Layer> layer() override; | 106 scoped_refptr<cc::Layer> layer() override; |
| 105 | 107 |
| 106 static void ComputePaddingPositions(const gfx::Size& content_size, | 108 static void ComputePaddingPositions(const gfx::Size& content_size, |
| 107 const gfx::Size& desired_size, | 109 const gfx::Size& desired_size, |
| 108 gfx::Rect* side_padding_rect, | 110 gfx::Rect* side_padding_rect, |
| 109 gfx::Rect* bottom_padding_rect); | 111 gfx::Rect* bottom_padding_rect); |
| 110 | 112 |
| 111 protected: | 113 protected: |
| 112 TabLayer(bool incognito, | 114 TabLayer(bool incognito, |
| 113 ui::ResourceManager* resource_manager, | 115 ui::ResourceManager* resource_manager, |
| 114 LayerTitleCache* layer_title_cache, | 116 LayerTitleCache* layer_title_cache, |
| 115 TabContentManager* tab_content_manager); | 117 TabContentManager* tab_content_manager); |
| 116 ~TabLayer() override; | 118 ~TabLayer() override; |
| 117 | 119 |
| 118 private: | 120 private: |
| 119 void SetTitle(DecorationTitle* title); | 121 void SetTitle(DecorationTitle* title); |
| 120 std::unique_ptr<cc::FilterOperations> createSolidColorFilter(int color); | |
| 121 | 122 |
| 122 const bool incognito_; | 123 const bool incognito_; |
| 123 bool toolbar_background_color_; | |
| 124 bool close_button_color_; | |
| 125 ui::ResourceManager* resource_manager_; | 124 ui::ResourceManager* resource_manager_; |
| 126 LayerTitleCache* layer_title_cache_; | 125 LayerTitleCache* layer_title_cache_; |
| 127 | 126 |
| 128 // [layer]-+-[toolbar] | 127 // [layer]-+-[toolbar] |
| 129 // +-[close button] | 128 // +-[close button] |
| 130 // +-[title] | 129 // +-[title] |
| 131 // +-[front border] | 130 // +-[front border] |
| 132 // +-[content] | 131 // +-[content] |
| 133 // +-[back_logo] | 132 // +-[back_logo] |
| 134 // +-[padding] | 133 // +-[padding] |
| (...skipping 15 matching lines...) Expand all Loading... |
| 150 scoped_refptr<cc::UIResourceLayer> back_logo_; | 149 scoped_refptr<cc::UIResourceLayer> back_logo_; |
| 151 float brightness_; | 150 float brightness_; |
| 152 | 151 |
| 153 DISALLOW_COPY_AND_ASSIGN(TabLayer); | 152 DISALLOW_COPY_AND_ASSIGN(TabLayer); |
| 154 }; | 153 }; |
| 155 | 154 |
| 156 } // namespace android | 155 } // namespace android |
| 157 } // namespace chrome | 156 } // namespace chrome |
| 158 | 157 |
| 159 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ | 158 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_TAB_LAYER_H_ |
| OLD | NEW |