Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/android/compositor/layer/tab_handle_layer.cc

Issue 1747783002: CC Animation: Erase old animation system in Android Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #include "chrome/browser/android/compositor/layer/tab_handle_layer.h" 5 #include "chrome/browser/android/compositor/layer/tab_handle_layer.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/layer_settings.h"
9 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
10 #include "cc/resources/scoped_ui_resource.h" 11 #include "cc/resources/scoped_ui_resource.h"
11 #include "chrome/browser/android/compositor/decoration_title.h" 12 #include "chrome/browser/android/compositor/decoration_title.h"
12 #include "chrome/browser/android/compositor/layer_title_cache.h" 13 #include "chrome/browser/android/compositor/layer_title_cache.h"
13 #include "content/public/browser/android/compositor.h" 14 #include "content/public/browser/android/compositor.h"
14 #include "ui/android/resources/resource_manager.h" 15 #include "ui/android/resources/resource_manager.h"
15 #include "ui/base/l10n/l10n_util_android.h" 16 #include "ui/base/l10n/l10n_util_android.h"
16 17
17 namespace chrome { 18 namespace chrome {
18 namespace android { 19 namespace android {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 close_button_->SetOpacity(close_button_alpha); 172 close_button_->SetOpacity(close_button_alpha);
172 } 173 }
173 } 174 }
174 175
175 scoped_refptr<cc::Layer> TabHandleLayer::layer() { 176 scoped_refptr<cc::Layer> TabHandleLayer::layer() {
176 return layer_; 177 return layer_;
177 } 178 }
178 179
179 TabHandleLayer::TabHandleLayer(LayerTitleCache* layer_title_cache) 180 TabHandleLayer::TabHandleLayer(LayerTitleCache* layer_title_cache)
180 : layer_title_cache_(layer_title_cache), 181 : layer_title_cache_(layer_title_cache),
181 layer_(cc::Layer::Create(content::Compositor::LayerSettings())), 182 layer_(cc::Layer::Create(cc::LayerSettings())),
182 close_button_( 183 close_button_(
183 cc::UIResourceLayer::Create(content::Compositor::LayerSettings())), 184 cc::UIResourceLayer::Create(cc::LayerSettings())),
184 decoration_tab_( 185 decoration_tab_(
185 cc::NinePatchLayer::Create(content::Compositor::LayerSettings())), 186 cc::NinePatchLayer::Create(cc::LayerSettings())),
186 border_( 187 border_(
187 cc::SolidColorLayer::Create(content::Compositor::LayerSettings())), 188 cc::SolidColorLayer::Create(cc::LayerSettings())),
188 brightness_(1.0f), 189 brightness_(1.0f),
189 foreground_(false) { 190 foreground_(false) {
190 decoration_tab_->SetIsDrawable(true); 191 decoration_tab_->SetIsDrawable(true);
191 layer_->AddChild(decoration_tab_); 192 layer_->AddChild(decoration_tab_);
192 layer_->AddChild(close_button_); 193 layer_->AddChild(close_button_);
193 } 194 }
194 195
195 TabHandleLayer::~TabHandleLayer() { 196 TabHandleLayer::~TabHandleLayer() {
196 } 197 }
197 198
198 } // namespace android 199 } // namespace android
199 } // namespace chrome 200 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/layer/overlay_panel_layer.cc ('k') | chrome/browser/android/compositor/layer/tab_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698