OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_view.h" | 5 #include "chrome/browser/ui/views/toolbar_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // our spacing to make it match. | 86 // our spacing to make it match. |
87 const int kLeftEdgeSpacing = 3; | 87 const int kLeftEdgeSpacing = 3; |
88 const int kRightEdgeSpacing = 2; | 88 const int kRightEdgeSpacing = 2; |
89 | 89 |
90 // Ash doesn't use a rounded content area and its top edge has an extra shadow. | 90 // Ash doesn't use a rounded content area and its top edge has an extra shadow. |
91 const int kContentShadowHeightAsh = 2; | 91 const int kContentShadowHeightAsh = 2; |
92 | 92 |
93 // Non-ash uses a rounded content area with no shadow in the assets. | 93 // Non-ash uses a rounded content area with no shadow in the assets. |
94 const int kContentShadowHeight = 0; | 94 const int kContentShadowHeight = 0; |
95 | 95 |
96 // Top margin for the wrench menu badges (badge is placed in the upper right | |
97 // corner of the wrench menu). | |
98 const int kBadgeTopMargin = 2; | |
99 | |
100 int GetButtonSpacing() { | 96 int GetButtonSpacing() { |
101 return (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) ? | 97 return (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) ? |
102 ToolbarView::kStandardSpacing : 0; | 98 ToolbarView::kStandardSpacing : 0; |
103 } | 99 } |
104 | 100 |
105 bool IsStreamlinedHostedAppsEnabled() { | 101 bool IsStreamlinedHostedAppsEnabled() { |
106 return CommandLine::ForCurrentProcess()->HasSwitch( | 102 return CommandLine::ForCurrentProcess()->HasSwitch( |
107 switches::kEnableStreamlinedHostedApps); | 103 switches::kEnableStreamlinedHostedApps); |
108 } | 104 } |
109 | 105 |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 | 796 |
801 void ToolbarView::OnShowHomeButtonChanged() { | 797 void ToolbarView::OnShowHomeButtonChanged() { |
802 Layout(); | 798 Layout(); |
803 SchedulePaint(); | 799 SchedulePaint(); |
804 } | 800 } |
805 | 801 |
806 int ToolbarView::content_shadow_height() const { | 802 int ToolbarView::content_shadow_height() const { |
807 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? | 803 return browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH ? |
808 kContentShadowHeightAsh : kContentShadowHeight; | 804 kContentShadowHeightAsh : kContentShadowHeight; |
809 } | 805 } |
OLD | NEW |