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

Side by Side Diff: chrome/browser/browser_url_handler.cc

Issue 12418: Implement History as HTML and add/change a bunch of stuff to make it easier t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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_resources.rc ('k') | chrome/browser/browsing_instance.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser_url_handler.h" 5 #include "chrome/browser/browser_url_handler.h"
6 6
7 #include "chrome/browser/browser_about_handler.h" 7 #include "chrome/browser/browser_about_handler.h"
8 #include "chrome/browser/dom_ui/new_tab_ui.h" 8 #include "chrome/browser/dom_ui/new_tab_ui.h"
9 #include "chrome/browser/dom_ui/dom_ui_contents.h"
9 10
10 std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_; 11 std::vector<BrowserURLHandler::URLHandler> BrowserURLHandler::url_handlers_;
11 12
12 // static 13 // static
13 void BrowserURLHandler::InitURLHandlers() { 14 void BrowserURLHandler::InitURLHandlers() {
14 if (!url_handlers_.empty()) 15 if (!url_handlers_.empty())
15 return; 16 return;
16 17
17 // Here is where we initialize the global list of handlers for special URLs. 18 // Here is where we initialize the global list of handlers for special URLs.
18 // about:* 19 // about:*
19 url_handlers_.push_back(&BrowserAboutHandler::MaybeHandle); 20 url_handlers_.push_back(&BrowserAboutHandler::MaybeHandle);
21 // chrome-internal:*
22 url_handlers_.push_back(&NewTabUIHandleURL);
20 // chrome:* 23 // chrome:*
21 url_handlers_.push_back(&NewTabUIHandleURL); 24 url_handlers_.push_back(&DOMUIContentsCanHandleURL);
22 } 25 }
23 26
24 // static 27 // static
25 bool BrowserURLHandler::HandleBrowserURL(GURL* url, TabContentsType* type) { 28 bool BrowserURLHandler::HandleBrowserURL(GURL* url, TabContentsType* type) {
26 if (url_handlers_.empty()) 29 if (url_handlers_.empty())
27 InitURLHandlers(); 30 InitURLHandlers();
28 for (size_t i = 0; i < url_handlers_.size(); ++i) { 31 for (size_t i = 0; i < url_handlers_.size(); ++i) {
29 if ((*url_handlers_[i])(url, type)) 32 if ((*url_handlers_[i])(url, type))
30 return true; 33 return true;
31 } 34 }
32 return false; 35 return false;
33 } 36 }
34 37
35 38
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.rc ('k') | chrome/browser/browsing_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698