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 "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/layers/layer_collections.h" | 10 #include "cc/layers/layer_collections.h" |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 close_button_->SetUIResourceId(close_btn_resource->ui_resource()->id()); | 447 close_button_->SetUIResourceId(close_btn_resource->ui_resource()->id()); |
448 | 448 |
449 if (!back_visible) { | 449 if (!back_visible) { |
450 gfx::Rect rounded_descaled_content_area( | 450 gfx::Rect rounded_descaled_content_area( |
451 round(descaled_local_content_area.x()), | 451 round(descaled_local_content_area.x()), |
452 round(descaled_local_content_area.y()), | 452 round(descaled_local_content_area.y()), |
453 round(desired_content_size.width()), | 453 round(desired_content_size.width()), |
454 round(desired_content_size.height())); | 454 round(desired_content_size.height())); |
455 | 455 |
456 content_->SetProperties(id, can_use_live_layer, static_to_view_blend, | 456 content_->SetProperties(id, can_use_live_layer, static_to_view_blend, true, |
457 true, alpha, saturation, | 457 alpha, saturation, true, |
458 true, rounded_descaled_content_area); | 458 rounded_descaled_content_area); |
459 } else if (back_logo_resource) { | 459 } else if (back_logo_resource) { |
460 back_logo_->SetUIResourceId(back_logo_resource->ui_resource()->id()); | 460 back_logo_->SetUIResourceId(back_logo_resource->ui_resource()->id()); |
461 } | 461 } |
462 | 462 |
463 //---------------------------------------------------------------------------- | 463 //---------------------------------------------------------------------------- |
464 // Push Size, Position, Alpha and Transformations to Layers | 464 // Push Size, Position, Alpha and Transformations to Layers |
465 //---------------------------------------------------------------------------- | 465 //---------------------------------------------------------------------------- |
466 shadow_->SetHideLayerAndSubtree(!shadow_visible); | 466 shadow_->SetHideLayerAndSubtree(!shadow_visible); |
467 if (shadow_visible) { | 467 if (shadow_visible) { |
468 shadow_->SetPosition(shadow_position); | 468 shadow_->SetPosition(shadow_position); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 title_->RemoveAllChildren(); | 682 title_->RemoveAllChildren(); |
683 title_->AddChild(layer); | 683 title_->AddChild(layer); |
684 } | 684 } |
685 } | 685 } |
686 | 686 |
687 if (title) | 687 if (title) |
688 title->SetUIResourceIds(); | 688 title->SetUIResourceIds(); |
689 } | 689 } |
690 | 690 |
691 } // namespace android | 691 } // namespace android |
OLD | NEW |