diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser.scons | 3 | ||||
-rw-r--r-- | chrome/browser/browser.vcproj | 14 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger.scons | 3 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger.vcproj | 8 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_contents.h | 36 | ||||
-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.h | 28 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_contents.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_factory.cc | 4 |
9 files changed, 61 insertions, 71 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())) |