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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 10947019: Constrained Window Cocoa: Disable fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 020e9058305fcfdf609d05997de82fe115f6e5b3..9dba99212fc4e698be7257e35a617ffd49814bff 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -577,11 +577,20 @@ bool TabStripModel::IsTabDiscarded(int index) const {
}
int TabStripModel::IndexOfFirstNonMiniTab() const {
- for (size_t i = 0; i < contents_data_.size(); ++i) {
- if (!IsMiniTab(static_cast<int>(i)))
- return static_cast<int>(i);
+ for (int i = 0; i < count(); ++i) {
+ if (!IsMiniTab(i))
+ return i;
+ }
+ // No non-mini-tabs.
+ return count();
+}
+
+int TabStripModel::IndexOfFirstBlockedTab() const {
sky 2012/11/07 00:25:39 See tab_strip_model_utils. It has this function.
sail 2012/11/07 00:58:48 Done. Good catch. Fixed.
+ for (int i = 0; i < count(); ++i) {
+ if (IsTabBlocked(i))
+ return i;
}
- // No mini-tabs.
+ // No blocked tabs.
return count();
}
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698