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

Side by Side Diff: chrome/browser/dom_ui/dom_ui_factory.cc

Issue 6053012: This adds a "killed tab" page and pages reload when killed on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indent Created 9 years, 11 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/browser_about_handler_unittest.cc ('k') | chrome/browser/gtk/sad_tab_gtk.h » ('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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler_unittest.cc ('k') | chrome/browser/gtk/sad_tab_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698