| 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/i18n/number_formatting.h" | 10 #include "base/i18n/number_formatting.h" |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 #if defined(OS_WIN) | 681 #if defined(OS_WIN) |
| 682 ConflictingModuleView::MaybeShow(browser_, app_menu_button_); | 682 ConflictingModuleView::MaybeShow(browser_, app_menu_button_); |
| 683 #endif | 683 #endif |
| 684 } | 684 } |
| 685 incompatibility_badge_showing = true; | 685 incompatibility_badge_showing = true; |
| 686 return; | 686 return; |
| 687 } | 687 } |
| 688 } | 688 } |
| 689 | 689 |
| 690 int ToolbarView::PopupTopSpacing() const { | 690 int ToolbarView::PopupTopSpacing() const { |
| 691 if (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) | 691 return (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ? |
| 692 return 0; | 692 0 : views::NonClientFrameView::kClientEdgeThickness; |
| 693 | |
| 694 const int kAdditionalPopupTopSpacingNonGlass = 2; | |
| 695 return views::NonClientFrameView::kClientEdgeThickness + | |
| 696 (GetWidget()->ShouldWindowContentsBeTransparent() ? | |
| 697 0 : kAdditionalPopupTopSpacingNonGlass); | |
| 698 } | 693 } |
| 699 | 694 |
| 700 gfx::Size ToolbarView::GetSizeInternal( | 695 gfx::Size ToolbarView::GetSizeInternal( |
| 701 gfx::Size (View::*get_size)() const) const { | 696 gfx::Size (View::*get_size)() const) const { |
| 702 gfx::Size size((location_bar_->*get_size)()); | 697 gfx::Size size((location_bar_->*get_size)()); |
| 703 if (is_display_mode_normal()) { | 698 if (is_display_mode_normal()) { |
| 704 const int element_padding = GetLayoutConstant(TOOLBAR_ELEMENT_PADDING); | 699 const int element_padding = GetLayoutConstant(TOOLBAR_ELEMENT_PADDING); |
| 705 const int browser_actions_width = | 700 const int browser_actions_width = |
| 706 (browser_actions_->*get_size)().width(); | 701 (browser_actions_->*get_size)().width(); |
| 707 const int right_padding = | 702 const int right_padding = |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 void ToolbarView::OnShowHomeButtonChanged() { | 802 void ToolbarView::OnShowHomeButtonChanged() { |
| 808 Layout(); | 803 Layout(); |
| 809 SchedulePaint(); | 804 SchedulePaint(); |
| 810 } | 805 } |
| 811 | 806 |
| 812 int ToolbarView::content_shadow_height() const { | 807 int ToolbarView::content_shadow_height() const { |
| 813 return GetLayoutConstant( | 808 return GetLayoutConstant( |
| 814 (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ? | 809 (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ? |
| 815 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH : TOOLBAR_CONTENT_SHADOW_HEIGHT); | 810 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH : TOOLBAR_CONTENT_SHADOW_HEIGHT); |
| 816 } | 811 } |
| OLD | NEW |