OLD | NEW |
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/api/tabs/tabs_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" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
13 #include "chrome/browser/ui/browser_window.h" | 13 #include "chrome/browser/ui/browser_window.h" |
14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
17 #include "chrome/common/extensions/extension_manifest_constants.h" | 17 #include "chrome/common/extensions/extension_manifest_constants.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "content/public/browser/favicon_status.h" | 19 #include "content/public/browser/favicon_status.h" |
20 #include "content/public/browser/navigation_entry.h" | 20 #include "content/public/browser/navigation_entry.h" |
21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
23 | 23 |
24 namespace keys = extension_tabs_module_constants; | 24 namespace keys = extensions::tabs_constants; |
25 namespace errors = extension_manifest_errors; | 25 namespace errors = extension_manifest_errors; |
26 | 26 |
27 using content::NavigationEntry; | 27 using content::NavigationEntry; |
28 using content::WebContents; | 28 using content::WebContents; |
29 | 29 |
30 int ExtensionTabUtil::GetWindowId(const Browser* browser) { | 30 int ExtensionTabUtil::GetWindowId(const Browser* browser) { |
31 return browser->session_id().id(); | 31 return browser->session_id().id(); |
32 } | 32 } |
33 | 33 |
34 int ExtensionTabUtil::GetWindowIdOfTabStripModel( | 34 int ExtensionTabUtil::GetWindowIdOfTabStripModel( |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |