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

Side by Side Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 10537062: TabContentsWrapper -> TabContents, part 13. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiz Created 8 years, 6 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
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/extensions/extension_tab_util.h" 5 #include "chrome/browser/extensions/extension_tab_util.h"
6 6
7 #include "chrome/browser/extensions/extension_tabs_module_constants.h" 7 #include "chrome/browser/extensions/extension_tabs_module_constants.h"
8 #include "chrome/browser/net/url_fixer_upper.h" 8 #include "chrome/browser/net/url_fixer_upper.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/restore_tab_helper.h" 10 #include "chrome/browser/sessions/restore_tab_helper.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents, 135 bool ExtensionTabUtil::GetTabStripModel(const WebContents* web_contents,
136 TabStripModel** tab_strip_model, 136 TabStripModel** tab_strip_model,
137 int* tab_index) { 137 int* tab_index) {
138 DCHECK(web_contents); 138 DCHECK(web_contents);
139 DCHECK(tab_strip_model); 139 DCHECK(tab_strip_model);
140 DCHECK(tab_index); 140 DCHECK(tab_index);
141 141
142 for (BrowserList::const_iterator it = BrowserList::begin(); 142 for (BrowserList::const_iterator it = BrowserList::begin();
143 it != BrowserList::end(); ++it) { 143 it != BrowserList::end(); ++it) {
144 TabStripModel* tab_strip = (*it)->tab_strip_model(); 144 TabStripModel* tab_strip = (*it)->tab_strip_model();
145 int index = tab_strip->GetWrapperIndex(web_contents); 145 int index = tab_strip->GetIndexOfWebContents(web_contents);
146 if (index != -1) { 146 if (index != -1) {
147 *tab_strip_model = tab_strip; 147 *tab_strip_model = tab_strip;
148 *tab_index = index; 148 *tab_index = index;
149 return true; 149 return true;
150 } 150 }
151 } 151 }
152 152
153 return false; 153 return false;
154 } 154 }
155 155
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 217
218 bool ExtensionTabUtil::IsCrashURL(const GURL& url) { 218 bool ExtensionTabUtil::IsCrashURL(const GURL& url) {
219 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly. 219 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly.
220 GURL fixed_url = 220 GURL fixed_url =
221 URLFixerUpper::FixupURL(url.possibly_invalid_spec(), std::string()); 221 URLFixerUpper::FixupURL(url.possibly_invalid_spec(), std::string());
222 return (fixed_url.SchemeIs(chrome::kChromeUIScheme) && 222 return (fixed_url.SchemeIs(chrome::kChromeUIScheme) &&
223 (fixed_url.host() == chrome::kChromeUIBrowserCrashHost || 223 (fixed_url.host() == chrome::kChromeUIBrowserCrashHost ||
224 fixed_url.host() == chrome::kChromeUICrashHost)); 224 fixed_url.host() == chrome::kChromeUICrashHost));
225 } 225 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698