OLD | NEW |
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/debugger/debugger_contents.h" | 7 #include "chrome/browser/debugger/debugger_contents.h" |
8 #include "chrome/browser/dom_ui/dev_tools_ui.h" | 8 #include "chrome/browser/dom_ui/dev_tools_ui.h" |
9 #include "chrome/browser/dom_ui/dom_ui.h" | 9 #include "chrome/browser/dom_ui/dom_ui.h" |
10 #include "chrome/browser/dom_ui/downloads_ui.h" | 10 #include "chrome/browser/dom_ui/downloads_ui.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 DCHECK(current_ui_); | 226 DCHECK(current_ui_); |
227 current_ui_->ProcessDOMUIMessage(message, content); | 227 current_ui_->ProcessDOMUIMessage(message, content); |
228 } | 228 } |
229 | 229 |
230 // static | 230 // static |
231 const std::string DOMUIContents::GetScheme() { | 231 const std::string DOMUIContents::GetScheme() { |
232 return chrome::kChromeUIScheme; | 232 return chrome::kChromeUIScheme; |
233 } | 233 } |
234 | 234 |
235 DOMUI* DOMUIContents::GetDOMUIForURL(const GURL &url) { | 235 DOMUI* DOMUIContents::GetDOMUIForURL(const GURL &url) { |
236 #if defined(OS_WIN) | |
237 // TODO(port): include this once these are converted to HTML | |
238 if (url.host() == NewTabUI::GetBaseURL().host() || | 236 if (url.host() == NewTabUI::GetBaseURL().host() || |
239 url.SchemeIs(chrome::kChromeInternalScheme)) { | 237 url.SchemeIs(chrome::kChromeInternalScheme)) { |
240 return new NewTabUI(this); | 238 return new NewTabUI(this); |
241 } else if (url.host() == HistoryUI::GetBaseURL().host()) { | 239 } |
| 240 #if defined(OS_WIN) |
| 241 // TODO(port): include this once these are converted to HTML |
| 242 if (url.host() == HistoryUI::GetBaseURL().host()) { |
242 return new HistoryUI(this); | 243 return new HistoryUI(this); |
243 } else if (url.host() == DownloadsUI::GetBaseURL().host()) { | 244 } else if (url.host() == DownloadsUI::GetBaseURL().host()) { |
244 return new DownloadsUI(this); | 245 return new DownloadsUI(this); |
245 } else if (url.host() == DebuggerContents::GetBaseURL().host()) { | 246 } else if (url.host() == DebuggerContents::GetBaseURL().host()) { |
246 return new DebuggerContents(this); | 247 return new DebuggerContents(this); |
247 } else if (url.host() == DevToolsUI::GetBaseURL().host()) { | 248 } else if (url.host() == DevToolsUI::GetBaseURL().host()) { |
248 return new DevToolsUI(this); | 249 return new DevToolsUI(this); |
249 } | 250 } |
250 #else | 251 #else |
251 NOTIMPLEMENTED(); | 252 NOTIMPLEMENTED(); |
252 #endif | 253 #endif |
253 return NULL; | 254 return NULL; |
254 } | 255 } |
OLD | NEW |