| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/views/toolbar/toolbar_view.h" | 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 569 |
| 570 forward_->SetBounds(next_element_x, child_y, | 570 forward_->SetBounds(next_element_x, child_y, |
| 571 forward_->GetPreferredSize().width(), child_height); | 571 forward_->GetPreferredSize().width(), child_height); |
| 572 next_element_x = forward_->bounds().right(); | 572 next_element_x = forward_->bounds().right(); |
| 573 | 573 |
| 574 reload_->SetBounds(next_element_x, child_y, | 574 reload_->SetBounds(next_element_x, child_y, |
| 575 reload_->GetPreferredSize().width(), child_height); | 575 reload_->GetPreferredSize().width(), child_height); |
| 576 next_element_x = reload_->bounds().right(); | 576 next_element_x = reload_->bounds().right(); |
| 577 | 577 |
| 578 if (show_home_button_.GetValue() || | 578 if (show_home_button_.GetValue() || |
| 579 (browser_->is_app() && | 579 (browser_->is_app() && extensions::util::IsNewBookmarkAppsEnabled())) { |
| 580 extensions::util::IsStreamlinedHostedAppsEnabled())) { | |
| 581 home_->SetVisible(true); | 580 home_->SetVisible(true); |
| 582 home_->SetBounds(next_element_x, child_y, | 581 home_->SetBounds(next_element_x, child_y, |
| 583 home_->GetPreferredSize().width(), child_height); | 582 home_->GetPreferredSize().width(), child_height); |
| 584 } else { | 583 } else { |
| 585 home_->SetVisible(false); | 584 home_->SetVisible(false); |
| 586 home_->SetBounds(next_element_x, child_y, 0, child_height); | 585 home_->SetBounds(next_element_x, child_y, 0, child_height); |
| 587 } | 586 } |
| 588 next_element_x = home_->bounds().right() + kStandardSpacing; | 587 next_element_x = home_->bounds().right() + kStandardSpacing; |
| 589 | 588 |
| 590 int browser_actions_width = browser_actions_->GetPreferredSize().width(); | 589 int browser_actions_width = browser_actions_->GetPreferredSize().width(); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 | 788 |
| 790 void ToolbarView::OnShowHomeButtonChanged() { | 789 void ToolbarView::OnShowHomeButtonChanged() { |
| 791 Layout(); | 790 Layout(); |
| 792 SchedulePaint(); | 791 SchedulePaint(); |
| 793 } | 792 } |
| 794 | 793 |
| 795 int ToolbarView::content_shadow_height() const { | 794 int ToolbarView::content_shadow_height() const { |
| 796 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? | 795 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? |
| 797 kContentShadowHeightAsh : kContentShadowHeight; | 796 kContentShadowHeightAsh : kContentShadowHeight; |
| 798 } | 797 } |
| OLD | NEW |