Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 1402453002: Parametrize some more constants that will be changing in MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 int end_x = std::min(frame()->GetMinimizeButtonOffset(), width()); 105 int end_x = std::min(frame()->GetMinimizeButtonOffset(), width());
106 106
107 // The new avatar button is optionally displayed to the left of the 107 // The new avatar button is optionally displayed to the left of the
108 // minimize button. 108 // minimize button.
109 if (new_avatar_button()) { 109 if (new_avatar_button()) {
110 end_x -= new_avatar_button()->width() + kNewAvatarButtonOffset; 110 end_x -= new_avatar_button()->width() + kNewAvatarButtonOffset;
111 111
112 // In non-maximized mode, allow the new tab button to slide completely under 112 // In non-maximized mode, allow the new tab button to slide completely under
113 // the avatar button. 113 // the avatar button.
114 if (!frame()->IsMaximized() && !base::i18n::IsRTL()) { 114 if (!frame()->IsMaximized() && !base::i18n::IsRTL()) {
115 end_x += 115 end_x += GetLayoutConstant(NEW_TAB_BUTTON_WIDTH) +
116 TabStrip::kNewTabButtonAssetWidth + kNewTabCaptionRestoredSpacing; 116 kNewTabCaptionRestoredSpacing;
117 } 117 }
118 } 118 }
119 119
120 int x = browser_view()->ShouldShowAvatar() ? 120 int x = browser_view()->ShouldShowAvatar() ?
121 (incognito_bounds_.right() + kIncognitoRightSpacing) : 121 (incognito_bounds_.right() + kIncognitoRightSpacing) :
122 NonClientBorderThickness() + kTabStripIndent; 122 NonClientBorderThickness() + kTabStripIndent;
123 // In RTL languages, we have moved an avatar icon left by the size of window 123 // In RTL languages, we have moved an avatar icon left by the size of window
124 // controls to prevent it from being rendered over them. So, we use its x 124 // controls to prevent it from being rendered over them. So, we use its x
125 // position to move this tab strip left when maximized. Also, we can render 125 // position to move this tab strip left when maximized. Also, we can render
126 // a tab strip until the left end of this window without considering the size 126 // a tab strip until the left end of this window without considering the size
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 static bool initialized = false; 632 static bool initialized = false;
633 if (!initialized) { 633 if (!initialized) {
634 for (int i = 0; i < kThrobberIconCount; ++i) { 634 for (int i = 0; i < kThrobberIconCount; ++i) {
635 throbber_icons_[i] = 635 throbber_icons_[i] =
636 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); 636 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i);
637 DCHECK(throbber_icons_[i]); 637 DCHECK(throbber_icons_[i]);
638 } 638 }
639 initialized = true; 639 initialized = true;
640 } 640 }
641 } 641 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698