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

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

Issue 272543003: Remove unused code for the metro window switcher button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
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/frame/opaque_browser_frame_view_layout.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/profiles/profiles_state.h" 8 #include "chrome/browser/profiles/profiles_state.h"
9 #include "chrome/browser/ui/views/profiles/avatar_label.h" 9 #include "chrome/browser/ui/views/profiles/avatar_label.h"
10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" 10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 leading_buttons_ = leading_buttons; 130 leading_buttons_ = leading_buttons;
131 trailing_buttons_ = trailing_buttons; 131 trailing_buttons_ = trailing_buttons;
132 } 132 }
133 133
134 gfx::Rect OpaqueBrowserFrameViewLayout::GetBoundsForTabStrip( 134 gfx::Rect OpaqueBrowserFrameViewLayout::GetBoundsForTabStrip(
135 const gfx::Size& tabstrip_preferred_size, 135 const gfx::Size& tabstrip_preferred_size,
136 int available_width) const { 136 int available_width) const {
137 available_width -= trailing_button_start_; 137 available_width -= trailing_button_start_;
138 available_width -= leading_button_start_; 138 available_width -= leading_button_start_;
139 139
140 if (delegate_->GetAdditionalReservedSpaceInTabStrip())
141 available_width -= delegate_->GetAdditionalReservedSpaceInTabStrip();
142
143 const int caption_spacing = NewTabCaptionSpacing(); 140 const int caption_spacing = NewTabCaptionSpacing();
144 const int tabstrip_width = available_width - caption_spacing; 141 const int tabstrip_width = available_width - caption_spacing;
145 gfx::Rect bounds(leading_button_start_, GetTabStripInsetsTop(false), 142 gfx::Rect bounds(leading_button_start_, GetTabStripInsetsTop(false),
146 std::max(0, tabstrip_width), 143 std::max(0, tabstrip_width),
147 tabstrip_preferred_size.height()); 144 tabstrip_preferred_size.height());
148 145
149 int leading_tabstrip_indent = kTabStripIndent; 146 int leading_tabstrip_indent = kTabStripIndent;
150 if (delegate_->ShouldShowAvatar() && !ShouldAvatarBeOnRight()) { 147 if (delegate_->ShouldShowAvatar() && !ShouldAvatarBeOnRight()) {
151 if (avatar_label_ && avatar_label_->bounds().width()) 148 if (avatar_label_ && avatar_label_->bounds().width())
152 leading_tabstrip_indent += kAvatarLabelInnerSpacing; 149 leading_tabstrip_indent += kAvatarLabelInnerSpacing;
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 681
685 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host, 682 void OpaqueBrowserFrameViewLayout::ViewAdded(views::View* host,
686 views::View* view) { 683 views::View* view) {
687 SetView(view->id(), view); 684 SetView(view->id(), view);
688 } 685 }
689 686
690 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host, 687 void OpaqueBrowserFrameViewLayout::ViewRemoved(views::View* host,
691 views::View* view) { 688 views::View* view) {
692 SetView(view->id(), NULL); 689 SetView(view->id(), NULL);
693 } 690 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698