| 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 #include "chrome/browser/android/compositor/layer/tab_layer.h" | 5 #include "chrome/browser/android/compositor/layer/tab_layer.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "cc/layers/image_layer.h" | 8 #include "cc/layers/image_layer.h" |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/layers/layer_lists.h" | 10 #include "cc/layers/layer_lists.h" |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 return layer_; | 523 return layer_; |
| 524 } | 524 } |
| 525 | 525 |
| 526 TabLayer::TabLayer(bool incognito, | 526 TabLayer::TabLayer(bool incognito, |
| 527 ui::ResourceManager* resource_manager, | 527 ui::ResourceManager* resource_manager, |
| 528 LayerTitleCache* layer_title_cache, | 528 LayerTitleCache* layer_title_cache, |
| 529 TabContentManager* tab_content_manager) | 529 TabContentManager* tab_content_manager) |
| 530 : incognito_(incognito), | 530 : incognito_(incognito), |
| 531 resource_manager_(resource_manager), | 531 resource_manager_(resource_manager), |
| 532 layer_title_cache_(layer_title_cache), | 532 layer_title_cache_(layer_title_cache), |
| 533 layer_(cc::Layer::Create()), | 533 layer_(cc::Layer::Create(ContentLayer::ContentLayerSettings())), |
| 534 toolbar_layer_(ToolbarLayer::Create()), | 534 toolbar_layer_(ToolbarLayer::Create()), |
| 535 title_(cc::Layer::Create()), | 535 title_(cc::Layer::Create(ContentLayer::ContentLayerSettings())), |
| 536 content_(ContentLayer::Create(tab_content_manager)), | 536 content_(ContentLayer::Create(tab_content_manager)), |
| 537 padding_(cc::SolidColorLayer::Create()), | 537 padding_( |
| 538 close_button_(cc::UIResourceLayer::Create()), | 538 cc::SolidColorLayer::Create(ContentLayer::ContentLayerSettings())), |
| 539 front_border_(cc::NinePatchLayer::Create()), | 539 close_button_( |
| 540 contour_shadow_(cc::NinePatchLayer::Create()), | 540 cc::UIResourceLayer::Create(ContentLayer::ContentLayerSettings())), |
| 541 shadow_(cc::NinePatchLayer::Create()), | 541 front_border_( |
| 542 back_logo_(cc::UIResourceLayer::Create()), | 542 cc::NinePatchLayer::Create(ContentLayer::ContentLayerSettings())), |
| 543 contour_shadow_( |
| 544 cc::NinePatchLayer::Create(ContentLayer::ContentLayerSettings())), |
| 545 shadow_(cc::NinePatchLayer::Create(ContentLayer::ContentLayerSettings())), |
| 546 back_logo_( |
| 547 cc::UIResourceLayer::Create(ContentLayer::ContentLayerSettings())), |
| 543 brightness_(1.f) { | 548 brightness_(1.f) { |
| 544 layer_->AddChild(shadow_); | 549 layer_->AddChild(shadow_); |
| 545 layer_->AddChild(contour_shadow_); | 550 layer_->AddChild(contour_shadow_); |
| 546 layer_->AddChild(padding_); | 551 layer_->AddChild(padding_); |
| 547 layer_->AddChild(content_->layer()); | 552 layer_->AddChild(content_->layer()); |
| 548 layer_->AddChild(back_logo_); | 553 layer_->AddChild(back_logo_); |
| 549 layer_->AddChild(front_border_); | 554 layer_->AddChild(front_border_); |
| 550 layer_->AddChild(title_.get()); | 555 layer_->AddChild(title_.get()); |
| 551 layer_->AddChild(close_button_); | 556 layer_->AddChild(close_button_); |
| 552 layer_->AddChild(toolbar_layer_->layer()); | 557 layer_->AddChild(toolbar_layer_->layer()); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 574 title_->AddChild(layer); | 579 title_->AddChild(layer); |
| 575 } | 580 } |
| 576 } | 581 } |
| 577 | 582 |
| 578 if (title) | 583 if (title) |
| 579 title->SetUIResourceIds(); | 584 title->SetUIResourceIds(); |
| 580 } | 585 } |
| 581 | 586 |
| 582 } // namespace android | 587 } // namespace android |
| 583 } // namespace chrome | 588 } // namespace chrome |
| OLD | NEW |