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

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

Issue 5005: Reorganize the declarations to have some grouping and logical ordering in tab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.cc ('k') | chrome/browser/web_contents.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/gfx/size.h" 7 #include "base/gfx/size.h"
8 #include "chrome/app/theme/theme_resources.h" 8 #include "chrome/app/theme/theme_resources.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/browser/tab_contents.h" 10 #include "chrome/browser/tab_contents.h"
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 1270
1271 void TabStrip::LoadingAnimationCallback() { 1271 void TabStrip::LoadingAnimationCallback() {
1272 for (int i = 0, index = 0; i < GetTabCount(); ++i, ++index) { 1272 for (int i = 0, index = 0; i < GetTabCount(); ++i, ++index) {
1273 Tab* current_tab = GetTabAt(i); 1273 Tab* current_tab = GetTabAt(i);
1274 if (current_tab->closing()) { 1274 if (current_tab->closing()) {
1275 --index; 1275 --index;
1276 } else { 1276 } else {
1277 TabContents* contents = model_->GetTabContentsAt(index); 1277 TabContents* contents = model_->GetTabContentsAt(index);
1278 if (!contents || !contents->is_loading()) { 1278 if (!contents || !contents->is_loading()) {
1279 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_NONE); 1279 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_NONE);
1280 } else if (contents->response_started()) { 1280 } else if (contents->waiting_for_response()) {
1281 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_WAITING); 1281 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_WAITING);
1282 } else { 1282 } else {
1283 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_LOADING); 1283 current_tab->ValidateLoadingAnimation(Tab::ANIMATION_LOADING);
1284 } 1284 }
1285 } 1285 }
1286 } 1286 }
1287 1287
1288 // Make sure the model delegates updates the animation as well. 1288 // Make sure the model delegates updates the animation as well.
1289 TabStripModelDelegate* delegate; 1289 TabStripModelDelegate* delegate;
1290 if (model_ && (delegate = model_->delegate())) 1290 if (model_ && (delegate = model_->delegate()))
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 int TabStrip::GetAvailableWidthForTabs(Tab* last_tab) const { 1566 int TabStrip::GetAvailableWidthForTabs(Tab* last_tab) const {
1567 return last_tab->x() + last_tab->width(); 1567 return last_tab->x() + last_tab->width();
1568 } 1568 }
1569 1569
1570 bool TabStrip::IsPointInTab(Tab* tab, const CPoint& point_in_tabstrip_coords) { 1570 bool TabStrip::IsPointInTab(Tab* tab, const CPoint& point_in_tabstrip_coords) {
1571 CPoint point_in_tab_coords(point_in_tabstrip_coords); 1571 CPoint point_in_tab_coords(point_in_tabstrip_coords);
1572 View::ConvertPointToView(this, tab, &point_in_tab_coords); 1572 View::ConvertPointToView(this, tab, &point_in_tab_coords);
1573 return tab->HitTest(point_in_tab_coords); 1573 return tab->HitTest(point_in_tab_coords);
1574 } 1574 }
1575 1575
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab_renderer.cc ('k') | chrome/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698