summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 19:23:16 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-13 19:23:16 +0000
commitfa2e32bada9bb65f8aa595569d2f41c02715bc63 (patch)
tree92d20f80bf4876a3ac16908bcdc87853fd7a7059
parenta946f334c5b243f7792e1f338d8cf1ca9413b24a (diff)
downloadchromium_src-fa2e32bada9bb65f8aa595569d2f41c02715bc63.zip
chromium_src-fa2e32bada9bb65f8aa595569d2f41c02715bc63.tar.gz
chromium_src-fa2e32bada9bb65f8aa595569d2f41c02715bc63.tar.bz2
Rename DebuggerContents to DebuggerUI and move to the dom_ui folder.
Review URL: http://codereview.chromium.org/46036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11655 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser.scons3
-rw-r--r--chrome/browser/browser.vcproj14
-rw-r--r--chrome/browser/debugger/debugger.scons3
-rw-r--r--chrome/browser/debugger/debugger.vcproj8
-rw-r--r--chrome/browser/debugger/debugger_contents.h36
-rw-r--r--chrome/browser/dom_ui/debugger_ui.cc (renamed from chrome/browser/debugger/debugger_contents.cc)30
-rw-r--r--chrome/browser/dom_ui/debugger_ui.h28
-rw-r--r--chrome/browser/dom_ui/dom_ui_contents.cc6
-rw-r--r--chrome/browser/tab_contents/tab_contents_factory.cc4
-rw-r--r--chrome/chrome.gyp4
-rw-r--r--chrome/common/url_constants.cc3
-rw-r--r--chrome/common/url_constants.h3
12 files changed, 67 insertions, 75 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 70da7dc..6949384 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -394,6 +394,8 @@ input_files = ChromeFileList([
MSVSFilter('DOM UI', [
'dom_ui/chrome_url_data_manager.cc',
'dom_ui/chrome_url_data_manager.h',
+ 'dom_ui/debugger_ui.cc',
+ 'dom_ui/debugger_ui.h',
'dom_ui/dev_tools_ui.cc',
'dom_ui/dev_tools_ui.h',
'dom_ui/dom_ui.cc',
@@ -672,6 +674,7 @@ if not env.Bit('windows'):
'browser_accessibility.cc',
'browser_accessibility_manager.cc',
'dock_info.cc',
+ 'dom_ui/debugger_ui.cc',
'dom_ui/html_dialog_contents.cc',
'download/download_exe.cc',
'download/download_util.cc',
diff --git a/chrome/browser/browser.vcproj b/chrome/browser/browser.vcproj
index e5c0614..eeff546 100644
--- a/chrome/browser/browser.vcproj
+++ b/chrome/browser/browser.vcproj
@@ -710,15 +710,15 @@
>
</File>
<File
- RelativePath=".\find_bar_controller.cc"
+ RelativePath=".\find_bar.h"
>
</File>
<File
- RelativePath=".\find_bar_controller.h"
+ RelativePath=".\find_bar_controller.cc"
>
</File>
<File
- RelativePath=".\find_bar.h"
+ RelativePath=".\find_bar_controller.h"
>
</File>
<File
@@ -1490,6 +1490,14 @@
>
</File>
<File
+ RelativePath=".\dom_ui\debugger_ui.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_ui\debugger_ui.h"
+ >
+ </File>
+ <File
RelativePath=".\dom_ui\dev_tools_ui.cc"
>
</File>
diff --git a/chrome/browser/debugger/debugger.scons b/chrome/browser/debugger/debugger.scons
index c1800f6..3b0cb2f 100644
--- a/chrome/browser/debugger/debugger.scons
+++ b/chrome/browser/debugger/debugger.scons
@@ -36,8 +36,6 @@ input_files = ChromeFileList([
'resources/debugger.js',
'resources/debugger_shell.js',
]),
- 'debugger_contents.cc',
- 'debugger_contents.h',
'debugger_host.h',
'debugger_host_impl.cpp',
'debugger_host_impl.h',
@@ -64,7 +62,6 @@ input_files = ChromeFileList([
if env.Bit('linux'):
# TODO(port): Port these.
input_files.Remove(
- 'debugger_contents.cc',
'debugger_view.cc',
'debugger_window.cc',
'dev_tools_view.cc',
diff --git a/chrome/browser/debugger/debugger.vcproj b/chrome/browser/debugger/debugger.vcproj
index 88af468..3cd3e16 100644
--- a/chrome/browser/debugger/debugger.vcproj
+++ b/chrome/browser/debugger/debugger.vcproj
@@ -142,14 +142,6 @@
</File>
</Filter>
<File
- RelativePath=".\debugger_contents.cc"
- >
- </File>
- <File
- RelativePath=".\debugger_contents.h"
- >
- </File>
- <File
RelativePath=".\debugger_host.h"
>
</File>
diff --git a/chrome/browser/debugger/debugger_contents.h b/chrome/browser/debugger/debugger_contents.h
deleted file mode 100644
index 01689c3..0000000
--- a/chrome/browser/debugger/debugger_contents.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// This file defines utility functions for working with strings.
-
-#ifndef CHROME_BROWSER_SHELL_DEBUGGER_CONTENTS_H__
-#define CHROME_BROWSER_SHELL_DEBUGGER_CONTENTS_H__
-
-#include "chrome/browser/dom_ui/dom_ui.h"
-
-class DebuggerContents : public DOMUI {
- public:
- DebuggerContents(DOMUIContents* contents);
-
- // DOMUI Implementation
- virtual void Init();
-
- // Return the URL for the front page of this UI.
- static GURL GetBaseURL();
-
- static bool IsDebuggerUrl(const GURL& url);
-
- protected:
- DOMUIContents* contents_;
-
- // WebContents overrides:
- // We override updating history with a no-op so these pages
- // are not saved to history.
- virtual void UpdateHistoryForNavigation(const GURL& url,
- const ViewHostMsg_FrameNavigate_Params& params) { }
-
- DISALLOW_EVIL_CONSTRUCTORS(DebuggerContents);
-};
-
-#endif // CHROME_BROWSER_DEBUGGER_CONTENTS_H__
diff --git a/chrome/browser/debugger/debugger_contents.cc b/chrome/browser/dom_ui/debugger_ui.cc
index 5927caa..3af0faa 100644
--- a/chrome/browser/debugger/debugger_contents.cc
+++ b/chrome/browser/dom_ui/debugger_ui.cc
@@ -1,27 +1,24 @@
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
-// This file defines utility functions for working with strings.
+
+#include "chrome/browser/dom_ui/debugger_ui.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/debugger/debugger_contents.h"
#include "chrome/browser/debugger/debugger_shell.h"
#include "chrome/browser/debugger/debugger_wrapper.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/resource_bundle.h"
+#include "chrome/common/url_constants.h"
#include "net/base/mime_util.h"
#include "grit/debugger_resources.h"
-// DebuggerUI is accessible from chrome-ui://inspector.
-static const char kDebuggerHost[] = "inspector";
-
class DebuggerHTMLSource : public ChromeURLDataManager::DataSource {
public:
// Creates our datasource and sets our user message to a specific message
@@ -117,15 +114,15 @@ class DebuggerHandler : public DOMMessageHandler {
}
private:
- DISALLOW_EVIL_CONSTRUCTORS(DebuggerHandler);
+ DISALLOW_COPY_AND_ASSIGN(DebuggerHandler);
};
-DebuggerContents::DebuggerContents(DOMUIContents* contents)
+DebuggerUI::DebuggerUI(DOMUIContents* contents)
: DOMUI(contents) {
}
-void DebuggerContents::Init() {
+void DebuggerUI::Init() {
AddMessageHandler(new DebuggerHandler(this));
DebuggerHTMLSource* html_source = new DebuggerHTMLSource();
@@ -136,15 +133,16 @@ void DebuggerContents::Init() {
}
// static
-bool DebuggerContents::IsDebuggerUrl(const GURL& url) {
- return (url.SchemeIs(DOMUIContents::GetScheme().c_str()) &&
- url.host() == kDebuggerHost);
+bool DebuggerUI::IsDebuggerUrl(const GURL& url) {
+ return url.SchemeIs(chrome::kChromeUIScheme) &&
+ url.host() == chrome::kInspectorHost;
}
// static
-GURL DebuggerContents::GetBaseURL() {
- std::string url = DOMUIContents::GetScheme();
- url += "://";
- url += kDebuggerHost;
+GURL DebuggerUI::GetBaseURL() {
+ // DebuggerUI is accessible from chrome-ui://inspector.
+ std::string url = chrome::kChromeUIScheme;
+ url += chrome::kStandardSchemeSeparator;
+ url += chrome::kInspectorHost;
return GURL(url);
}
diff --git a/chrome/browser/dom_ui/debugger_ui.h b/chrome/browser/dom_ui/debugger_ui.h
new file mode 100644
index 0000000..3b12ec9
--- /dev/null
+++ b/chrome/browser/dom_ui/debugger_ui.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// This file defines utility functions for working with strings.
+
+#ifndef CHROME_BROWSER_DOM_UI_DEBUGGER_UI_H_
+#define CHROME_BROWSER_DOM_UI_DEBUGGER_UI_H_
+
+#include "chrome/browser/dom_ui/dom_ui.h"
+
+class DebuggerUI : public DOMUI {
+ public:
+ DebuggerUI(DOMUIContents* contents);
+
+ // DOMUI Implementation
+ virtual void Init();
+
+ // Return the URL for the front page of this UI.
+ static GURL GetBaseURL();
+
+ static bool IsDebuggerUrl(const GURL& url);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DebuggerUI);
+};
+
+#endif // CHROME_BROWSER_DOM_UI_DEBUGGER_UI_H_
diff --git a/chrome/browser/dom_ui/dom_ui_contents.cc b/chrome/browser/dom_ui/dom_ui_contents.cc
index 4fe32d1..4d5f7e3 100644
--- a/chrome/browser/dom_ui/dom_ui_contents.cc
+++ b/chrome/browser/dom_ui/dom_ui_contents.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/dom_ui/dom_ui_contents.h"
-#include "chrome/browser/debugger/debugger_contents.h"
+#include "chrome/browser/dom_ui/debugger_ui.h"
#include "chrome/browser/dom_ui/dev_tools_ui.h"
#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/dom_ui/downloads_ui.h"
@@ -287,8 +287,8 @@ DOMUI* DOMUIContents::GetDOMUIForURL(const GURL &url) {
if (url.host() == ExtensionsUI::GetBaseURL().host()) {
return new ExtensionsUI(this);
}
- if (url.host() == DebuggerContents::GetBaseURL().host()) {
- return new DebuggerContents(this);
+ if (url.host() == DebuggerUI::GetBaseURL().host()) {
+ return new DebuggerUI(this);
}
if (url.host() == DevToolsUI::GetBaseURL().host()) {
return new DevToolsUI(this);
diff --git a/chrome/browser/tab_contents/tab_contents_factory.cc b/chrome/browser/tab_contents/tab_contents_factory.cc
index e519476..d6087e9 100644
--- a/chrome/browser/tab_contents/tab_contents_factory.cc
+++ b/chrome/browser/tab_contents/tab_contents_factory.cc
@@ -5,11 +5,11 @@
#include "base/string_util.h"
#include "chrome/browser/browser_about_handler.h"
#include "chrome/browser/browser_url_handler.h"
+#include "chrome/browser/dom_ui/debugger_ui.h"
#include "chrome/browser/dom_ui/dom_ui_contents.h"
#include "chrome/browser/dom_ui/new_tab_ui.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
-#include "chrome/browser/debugger/debugger_contents.h"
#include "chrome/browser/tab_contents/tab_contents_factory.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "net/base/net_util.h"
@@ -101,7 +101,7 @@ TabContentsType TabContents::TypeForURL(GURL* url) {
if (HtmlDialogContents::IsHtmlDialogUrl(*url))
return TAB_CONTENTS_HTML_DIALOG;
- if (DebuggerContents::IsDebuggerUrl(*url))
+ if (DebuggerUI::IsDebuggerUrl(*url))
return TAB_CONTENTS_DEBUGGER;
if (url->SchemeIs(DOMUIContents::GetScheme().c_str()))
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index d864387..0068bf6 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -510,8 +510,6 @@
'browser/command_updater.h',
'browser/cross_site_request_manager.cc',
'browser/cross_site_request_manager.h',
- 'browser/debugger/debugger_contents.cc',
- 'browser/debugger/debugger_contents.h',
'browser/debugger/debugger_host.h',
'browser/debugger/debugger_host_impl.cpp',
'browser/debugger/debugger_host_impl.h',
@@ -539,6 +537,8 @@
'browser/dom_operation_notification_details.h',
'browser/dom_ui/chrome_url_data_manager.cc',
'browser/dom_ui/chrome_url_data_manager.h',
+ 'browser/dom_ui/debugger_ui.cc',
+ 'browser/dom_ui/debugger_ui.h',
'browser/dom_ui/dev_tools_ui.cc',
'browser/dom_ui/dev_tools_ui.h',
'browser/dom_ui/dom_ui.cc',
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 9f718ca..c770320 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -31,7 +31,8 @@ const char kChromeUIIPCURL[] = "chrome-ui://about/ipc";
const char kChromeUINetworkURL[] = "chrome-ui://about/network";
const char kChromeUINewTabURL[] = "chrome-ui://newtab";
-const char kNewTabHost[] = "newtab";
const char kDevToolsHost[] = "devtools";
+const char kInspectorHost[] = "inspector";
+const char kNewTabHost[] = "newtab";
} // namespace chrome
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index 6abc73d..13313d3 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -39,8 +39,9 @@ extern const char kChromeUINetworkURL[];
extern const char kChromeUINewTabURL[];
// chrome-ui components of URLs.
-extern const char kNewTabHost[];
extern const char kDevToolsHost[];
+extern const char kInspectorHost[];
+extern const char kNewTabHost[];
} // namespace chrome