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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 6080002: TabStrip Cleanup (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: moved declaration and removed comment Created 9 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/tabs/tab_strip.h" 5 #include "chrome/browser/views/tabs/tab_strip.h"
6 6
7 #include "app/animation_container.h" 7 #include "app/animation_container.h"
8 #include "app/drag_drop_types.h" 8 #include "app/drag_drop_types.h"
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 //////////////////////////////////////////////////////////////////////////////// 162 ////////////////////////////////////////////////////////////////////////////////
163 // TabStrip, BaseTabStrip implementation: 163 // TabStrip, BaseTabStrip implementation:
164 164
165 int TabStrip::GetPreferredHeight() { 165 int TabStrip::GetPreferredHeight() {
166 return GetPreferredSize().height(); 166 return GetPreferredSize().height();
167 } 167 }
168 168
169 void TabStrip::SetBackgroundOffset(const gfx::Point& offset) { 169 void TabStrip::SetBackgroundOffset(const gfx::Point& offset) {
170 for (int i = 0; i < tab_count(); ++i) 170 for (int i = 0; i < tab_count(); ++i)
171 GetTabAtTabDataIndex(i)->SetBackgroundOffset(offset); 171 GetTabAtTabDataIndex(i)->set_background_offset(offset);
172 } 172 }
173 173
174 bool TabStrip::IsPositionInWindowCaption(const gfx::Point& point) { 174 bool TabStrip::IsPositionInWindowCaption(const gfx::Point& point) {
175 views::View* v = GetViewForPoint(point); 175 views::View* v = GetViewForPoint(point);
176 176
177 // If there is no control at this location, claim the hit was in the title 177 // If there is no control at this location, claim the hit was in the title
178 // bar to get a move action. 178 // bar to get a move action.
179 if (v == this) 179 if (v == this)
180 return true; 180 return true;
181 181
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 int TabStrip::GetAvailableWidthForTabs(Tab* last_tab) const { 966 int TabStrip::GetAvailableWidthForTabs(Tab* last_tab) const {
967 return last_tab->x() + last_tab->width(); 967 return last_tab->x() + last_tab->width();
968 } 968 }
969 969
970 bool TabStrip::IsPointInTab(Tab* tab, 970 bool TabStrip::IsPointInTab(Tab* tab,
971 const gfx::Point& point_in_tabstrip_coords) { 971 const gfx::Point& point_in_tabstrip_coords) {
972 gfx::Point point_in_tab_coords(point_in_tabstrip_coords); 972 gfx::Point point_in_tab_coords(point_in_tabstrip_coords);
973 View::ConvertPointToView(this, tab, &point_in_tab_coords); 973 View::ConvertPointToView(this, tab, &point_in_tab_coords);
974 return tab->HitTest(point_in_tab_coords); 974 return tab->HitTest(point_in_tab_coords);
975 } 975 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698