| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/frame/glass_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // The new avatar button is optionally displayed to the left of the | 115 // The new avatar button is optionally displayed to the left of the |
| 116 // minimize button. | 116 // minimize button. |
| 117 if (new_avatar_button()) { | 117 if (new_avatar_button()) { |
| 118 const int old_end_x = end_x; | 118 const int old_end_x = end_x; |
| 119 end_x -= new_avatar_button()->width() + kNewAvatarButtonOffset; | 119 end_x -= new_avatar_button()->width() + kNewAvatarButtonOffset; |
| 120 | 120 |
| 121 // In non-maximized mode, allow the new tab button to slide completely | 121 // In non-maximized mode, allow the new tab button to slide completely |
| 122 // under the avatar button. | 122 // under the avatar button. |
| 123 if (!frame()->IsMaximized()) { | 123 if (!frame()->IsMaximized()) { |
| 124 end_x = std::min(end_x + GetLayoutConstant(NEW_TAB_BUTTON_WIDTH) + | 124 end_x = std::min(end_x + GetLayoutSize(NEW_TAB_BUTTON).width() + |
| 125 kNewTabCaptionRestoredSpacing, | 125 kNewTabCaptionRestoredSpacing, |
| 126 old_end_x); | 126 old_end_x); |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 return gfx::Rect(x, NonClientTopBorderHeight(false), std::max(0, end_x - x), | 130 return gfx::Rect(x, NonClientTopBorderHeight(false), std::max(0, end_x - x), |
| 131 tabstrip->GetPreferredSize().height()); | 131 tabstrip->GetPreferredSize().height()); |
| 132 } | 132 } |
| 133 | 133 |
| 134 int GlassBrowserFrameView::GetTopInset(bool restored) const { | 134 int GlassBrowserFrameView::GetTopInset(bool restored) const { |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 static bool initialized = false; | 671 static bool initialized = false; |
| 672 if (!initialized) { | 672 if (!initialized) { |
| 673 for (int i = 0; i < kThrobberIconCount; ++i) { | 673 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 674 throbber_icons_[i] = | 674 throbber_icons_[i] = |
| 675 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 675 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 676 DCHECK(throbber_icons_[i]); | 676 DCHECK(throbber_icons_[i]); |
| 677 } | 677 } |
| 678 initialized = true; | 678 initialized = true; |
| 679 } | 679 } |
| 680 } | 680 } |
| OLD | NEW |