| OLD | NEW |
| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/gfx/point.h" | 7 #include "base/gfx/point.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
| 10 #include "chrome/browser/browser_about_handler.h" | 10 #include "chrome/browser/browser_about_handler.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 return kNoTab; | 210 return kNoTab; |
| 211 } | 211 } |
| 212 | 212 |
| 213 void TabStripModel::UpdateTabContentsStateAt(int index) { | 213 void TabStripModel::UpdateTabContentsStateAt(int index) { |
| 214 DCHECK(ContainsIndex(index)); | 214 DCHECK(ContainsIndex(index)); |
| 215 | 215 |
| 216 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, | 216 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, |
| 217 TabChangedAt(GetContentsAt(index), index)); | 217 TabChangedAt(GetContentsAt(index), index)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 void TabStripModel::UpdateTabContentsLoadingAnimations() { | |
| 221 FOR_EACH_OBSERVER(TabStripModelObserver, observers_, | |
| 222 TabValidateAnimations()); | |
| 223 } | |
| 224 | |
| 225 void TabStripModel::CloseAllTabs() { | 220 void TabStripModel::CloseAllTabs() { |
| 226 // Set state so that observers can adjust their behavior to suit this | 221 // Set state so that observers can adjust their behavior to suit this |
| 227 // specific condition when CloseTabContentsAt causes a flurry of | 222 // specific condition when CloseTabContentsAt causes a flurry of |
| 228 // Close/Detach/Select notifications to be sent. | 223 // Close/Detach/Select notifications to be sent. |
| 229 closing_all_ = true; | 224 closing_all_ = true; |
| 230 for (int i = count() - 1; i >= 0; --i) | 225 for (int i = count() - 1; i >= 0; --i) |
| 231 CloseTabContentsAt(i); | 226 CloseTabContentsAt(i); |
| 232 } | 227 } |
| 233 | 228 |
| 234 bool TabStripModel::TabsAreLoading() const { | 229 bool TabStripModel::TabsAreLoading() const { |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 } | 601 } |
| 607 | 602 |
| 608 // static | 603 // static |
| 609 bool TabStripModel::OpenerMatches(TabContentsData* data, | 604 bool TabStripModel::OpenerMatches(TabContentsData* data, |
| 610 NavigationController* opener, | 605 NavigationController* opener, |
| 611 bool use_group) { | 606 bool use_group) { |
| 612 return data->opener == opener || (use_group && data->group == opener); | 607 return data->opener == opener || (use_group && data->group == opener); |
| 613 } | 608 } |
| 614 | 609 |
| 615 | 610 |
| OLD | NEW |