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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model_utils.cc

Issue 253493005: [Mac] Allow fullscreen transitions while constrained windows are open. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove chrome::IndexOfFirstBlockedTab() Created 6 years, 8 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/tabs/tab_strip_model_utils.h ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tabs/tab_strip_model_utils.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model_utils.h"
6 6
7 #include "chrome/browser/history/top_sites.h" 7 #include "chrome/browser/history/top_sites.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 10
11 namespace chrome { 11 namespace chrome {
12 12
13 int IndexOfFirstBlockedTab(const TabStripModel* model) {
14 DCHECK(model);
15 for (int i = 0; i < model->count(); ++i) {
16 if (model->IsTabBlocked(i))
17 return i;
18 }
19 // No blocked tabs.
20 return model->count();
21 }
22
23 void GetOpenUrls(const TabStripModel& tabs, 13 void GetOpenUrls(const TabStripModel& tabs,
24 const history::TopSites& top_sites, 14 const history::TopSites& top_sites,
25 std::set<std::string>* urls) { 15 std::set<std::string>* urls) {
26 for (int i = 0; i < tabs.count(); ++i) { 16 for (int i = 0; i < tabs.count(); ++i) {
27 content::WebContents* web_contents = tabs.GetWebContentsAt(i); 17 content::WebContents* web_contents = tabs.GetWebContentsAt(i);
28 if (web_contents) 18 if (web_contents)
29 urls->insert(top_sites.GetCanonicalURLString(web_contents->GetURL())); 19 urls->insert(top_sites.GetCanonicalURLString(web_contents->GetURL()));
30 } 20 }
31 } 21 }
32 22
33 } // namespace chrome 23 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698