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

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

Issue 18175: Change chrome:// to chrome-ui://, fix up one chrome-resource:// reference. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/dom_ui/dom_ui_contents.h ('k') | chrome/browser/dom_ui/history_ui.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/dom_ui/dom_ui_contents.h" 5 #include "chrome/browser/dom_ui/dom_ui_contents.h"
6 6
7 #include "chrome/browser/dom_ui/dom_ui.h" 7 #include "chrome/browser/dom_ui/dom_ui.h"
8 #include "chrome/browser/dom_ui/history_ui.h" 8 #include "chrome/browser/dom_ui/history_ui.h"
9 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
10 #include "chrome/browser/tab_contents/navigation_entry.h" 10 #include "chrome/browser/tab_contents/navigation_entry.h"
11 #include "chrome/common/resource_bundle.h" 11 #include "chrome/common/resource_bundle.h"
12 12
13 // The scheme used for DOMUIContentses 13 // The scheme used for DOMUIContentses
14 // TODO(glen): Merge this with the scheme in chrome_url_data_manager 14 // TODO(glen): Merge this with the scheme in chrome_url_data_manager
15 static const char kURLScheme[] = "chrome"; 15 static const char kURLScheme[] = "chrome-ui";
16 16
17 // The path used in internal URLs to thumbnail data. 17 // The path used in internal URLs to thumbnail data.
18 static const char kThumbnailPath[] = "thumb"; 18 static const char kThumbnailPath[] = "thumb";
19 19
20 // The path used in internal URLs to favicon data. 20 // The path used in internal URLs to favicon data.
21 static const char kFavIconPath[] = "favicon"; 21 static const char kFavIconPath[] = "favicon";
22 22
23 /////////////////////////////////////////////////////////////////////////////// 23 ///////////////////////////////////////////////////////////////////////////////
24 // FavIconSource 24 // FavIconSource
25 25
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 IDR_DEFAULT_THUMBNAIL, &default_thumbnail_->data); 110 IDR_DEFAULT_THUMBNAIL, &default_thumbnail_->data);
111 } 111 }
112 112
113 SendResponse(request_id, default_thumbnail_); 113 SendResponse(request_id, default_thumbnail_);
114 } 114 }
115 } 115 }
116 116
117 /////////////////////////////////////////////////////////////////////////////// 117 ///////////////////////////////////////////////////////////////////////////////
118 // DOMUIContents 118 // DOMUIContents
119 119
120 // This is the top-level URL handler for chrome: URLs, and exposed in 120 // This is the top-level URL handler for chrome-ui: URLs, and exposed in
121 // our header file. The individual DOMUIs provide a chrome: 121 // our header file. The individual DOMUIs provide a chrome-ui:// HTML source
122 // HTML source at the same host/path. 122 // at the same host/path.
123 bool DOMUIContentsCanHandleURL(GURL* url, 123 bool DOMUIContentsCanHandleURL(GURL* url,
124 TabContentsType* result_type) { 124 TabContentsType* result_type) {
125 if (!url->SchemeIs(kURLScheme)) 125 if (!url->SchemeIs(kURLScheme))
126 return false; 126 return false;
127 127
128 // TODO: remove once the debugger is using DOMContentsUI 128 // TODO: remove once the debugger is using DOMContentsUI
129 if (url->host().compare("inspector") == 0 && 129 if (url->host().compare("inspector") == 0 &&
130 url->path().compare("/debugger.html") == 0) 130 url->path().compare("/debugger.html") == 0)
131 return false; 131 return false;
132 132
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 void DOMUIContents::ProcessDOMUIMessage(const std::string& message, 199 void DOMUIContents::ProcessDOMUIMessage(const std::string& message,
200 const std::string& content) { 200 const std::string& content) {
201 DCHECK(current_ui_); 201 DCHECK(current_ui_);
202 current_ui_->ProcessDOMUIMessage(message, content); 202 current_ui_->ProcessDOMUIMessage(message, content);
203 } 203 }
204 204
205 // static 205 // static
206 const std::string DOMUIContents::GetScheme() { 206 const std::string DOMUIContents::GetScheme() {
207 return kURLScheme; 207 return kURLScheme;
208 } 208 }
209
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_contents.h ('k') | chrome/browser/dom_ui/history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698