OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/dom_ui_factory.h" | 5 #include "chrome/browser/dom_ui/dom_ui_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/about_flags.h" | 8 #include "chrome/browser/about_flags.h" |
9 #include "chrome/browser/dom_ui/bookmarks_ui.h" | 9 #include "chrome/browser/dom_ui/bookmarks_ui.h" |
10 #include "chrome/browser/dom_ui/bug_report_ui.h" | 10 #include "chrome/browser/dom_ui/bug_report_ui.h" |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 244 } |
245 | 245 |
246 // static | 246 // static |
247 bool DOMUIFactory::IsURLAcceptableForDOMUI(Profile* profile, const GURL& url) { | 247 bool DOMUIFactory::IsURLAcceptableForDOMUI(Profile* profile, const GURL& url) { |
248 return UseDOMUIForURL(profile, url) || | 248 return UseDOMUIForURL(profile, url) || |
249 // javacsript: URLs are allowed to run in DOM UI pages | 249 // javacsript: URLs are allowed to run in DOM UI pages |
250 url.SchemeIs(chrome::kJavaScriptScheme) || | 250 url.SchemeIs(chrome::kJavaScriptScheme) || |
251 // It's possible to load about:blank in a DOM UI renderer. | 251 // It's possible to load about:blank in a DOM UI renderer. |
252 // See http://crbug.com/42547 | 252 // See http://crbug.com/42547 |
253 url.spec() == chrome::kAboutBlankURL || | 253 url.spec() == chrome::kAboutBlankURL || |
254 // about:crash, about:hang, and about:shorthang are allowed. | 254 // about:crash, about:kill, about:hang, and about:shorthang are allowed. |
255 url.spec() == chrome::kAboutCrashURL || | 255 url.spec() == chrome::kAboutCrashURL || |
| 256 url.spec() == chrome::kAboutKillURL || |
256 url.spec() == chrome::kAboutHangURL || | 257 url.spec() == chrome::kAboutHangURL || |
257 url.spec() == chrome::kAboutShorthangURL; | 258 url.spec() == chrome::kAboutShorthangURL; |
258 } | 259 } |
259 | 260 |
260 // static | 261 // static |
261 DOMUI* DOMUIFactory::CreateDOMUIForURL(TabContents* tab_contents, | 262 DOMUI* DOMUIFactory::CreateDOMUIForURL(TabContents* tab_contents, |
262 const GURL& url) { | 263 const GURL& url) { |
263 DOMUIFactoryFunction function = GetDOMUIFactoryFunction( | 264 DOMUIFactoryFunction function = GetDOMUIFactoryFunction( |
264 tab_contents->profile(), url); | 265 tab_contents->profile(), url); |
265 if (!function) | 266 if (!function) |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 if (page_url.host() == chrome::kChromeUIPluginsHost) | 330 if (page_url.host() == chrome::kChromeUIPluginsHost) |
330 return PluginsUI::GetFaviconResourceBytes(); | 331 return PluginsUI::GetFaviconResourceBytes(); |
331 | 332 |
332 #if defined(ENABLE_REMOTING) | 333 #if defined(ENABLE_REMOTING) |
333 if (page_url.host() == chrome::kChromeUIRemotingHost) | 334 if (page_url.host() == chrome::kChromeUIRemotingHost) |
334 return RemotingUI::GetFaviconResourceBytes(); | 335 return RemotingUI::GetFaviconResourceBytes(); |
335 #endif | 336 #endif |
336 | 337 |
337 return NULL; | 338 return NULL; |
338 } | 339 } |
OLD | NEW |