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

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

Issue 149643010: Cleanup: Move kChromeUIScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/ui/toolbar/origin_chip.cc » ('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) 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.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 if (!IsTabSelected(index)) { 1170 if (!IsTabSelected(index)) {
1171 std::vector<int> indices; 1171 std::vector<int> indices;
1172 indices.push_back(index); 1172 indices.push_back(index);
1173 return indices; 1173 return indices;
1174 } 1174 }
1175 return selection_model_.selected_indices(); 1175 return selection_model_.selected_indices();
1176 } 1176 }
1177 1177
1178 bool TabStripModel::IsNewTabAtEndOfTabStrip(WebContents* contents) const { 1178 bool TabStripModel::IsNewTabAtEndOfTabStrip(WebContents* contents) const {
1179 const GURL& url = contents->GetURL(); 1179 const GURL& url = contents->GetURL();
1180 return url.SchemeIs(chrome::kChromeUIScheme) && 1180 return url.SchemeIs(content::kChromeUIScheme) &&
1181 url.host() == chrome::kChromeUINewTabHost && 1181 url.host() == chrome::kChromeUINewTabHost &&
1182 contents == GetWebContentsAtImpl(count() - 1) && 1182 contents == GetWebContentsAtImpl(count() - 1) &&
1183 contents->GetController().GetEntryCount() == 1; 1183 contents->GetController().GetEntryCount() == 1;
1184 } 1184 }
1185 1185
1186 bool TabStripModel::InternalCloseTabs(const std::vector<int>& indices, 1186 bool TabStripModel::InternalCloseTabs(const std::vector<int>& indices,
1187 uint32 close_types) { 1187 uint32 close_types) {
1188 if (indices.empty()) 1188 if (indices.empty())
1189 return true; 1189 return true;
1190 1190
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 void TabStripModel::ForgetOpenersAndGroupsReferencing( 1397 void TabStripModel::ForgetOpenersAndGroupsReferencing(
1398 const WebContents* tab) { 1398 const WebContents* tab) {
1399 for (WebContentsDataVector::const_iterator i = contents_data_.begin(); 1399 for (WebContentsDataVector::const_iterator i = contents_data_.begin();
1400 i != contents_data_.end(); ++i) { 1400 i != contents_data_.end(); ++i) {
1401 if ((*i)->group() == tab) 1401 if ((*i)->group() == tab)
1402 (*i)->set_group(NULL); 1402 (*i)->set_group(NULL);
1403 if ((*i)->opener() == tab) 1403 if ((*i)->opener() == tab)
1404 (*i)->set_opener(NULL); 1404 (*i)->set_opener(NULL);
1405 } 1405 }
1406 } 1406 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/ui/toolbar/origin_chip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698