diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 22:45:34 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 22:45:34 +0000 |
commit | b689fce776a394377fed51ae063942509a2988a1 (patch) | |
tree | eb52e9944db424e9e1b80bcefe9b9b96b1c27b50 /chrome/browser/browser_url_handler.cc | |
parent | 84ae20cba3059760948ca5d1f313dc25c74b26d6 (diff) | |
download | chromium_src-b689fce776a394377fed51ae063942509a2988a1.zip chromium_src-b689fce776a394377fed51ae063942509a2988a1.tar.gz chromium_src-b689fce776a394377fed51ae063942509a2988a1.tar.bz2 |
Merge DOMUIContents into WebContents.
I did a lot of cleanup of the DOM UI system as part of this.
Review URL: http://codereview.chromium.org/42227
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_url_handler.cc')
-rw-r--r-- | chrome/browser/browser_url_handler.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/browser_url_handler.cc b/chrome/browser/browser_url_handler.cc index 88cb0e2..4da1daf 100644 --- a/chrome/browser/browser_url_handler.cc +++ b/chrome/browser/browser_url_handler.cc @@ -6,8 +6,9 @@ #include "base/string_util.h" #include "chrome/browser/browser_about_handler.h" -#include "chrome/browser/dom_ui/dom_ui_contents.h" +#include "chrome/browser/dom_ui/dom_ui_factory.h" #include "chrome/common/url_constants.h" +#include "googleurl/src/gurl.h" // Handles rewriting view-source URLs for what we'll actually load. static bool HandleViewSource(GURL* url, TabContentsType* type) { @@ -20,6 +21,15 @@ static bool HandleViewSource(GURL* url, TabContentsType* type) { return false; } +// Handles URLs for DOM UI. These URLs need no rewriting. +static bool HandleDOMUI(GURL* url, TabContentsType* type) { + if (!DOMUIFactory::UseDOMUIForURL(*url)) + return false; + + *type = TAB_CONTENTS_WEB; + return true; +} + std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_; // static @@ -29,7 +39,7 @@ void BrowserURLHandler::InitURLHandlers() { // Add the default URL handlers. url_handlers_.push_back(&WillHandleBrowserAboutURL); // about: - url_handlers_.push_back(&DOMUIContentsCanHandleURL); // chrome-ui: + url_handlers_.push_back(&HandleDOMUI); // chrome-ui: & friends. url_handlers_.push_back(&HandleViewSource); // view-source: } |