diff options
author | dgozman <dgozman@chromium.org> | 2015-04-28 09:31:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-28 16:31:57 +0000 |
commit | 88f570805c4cc7560bf527b8be4b8874740f35c2 (patch) | |
tree | 091a893f1615b2f0927e5057f5579d2ab438b906 /chromecast | |
parent | f18fe92b893c9888f1b6cf25806dfddc5b3e1072 (diff) | |
download | chromium_src-88f570805c4cc7560bf527b8be4b8874740f35c2.zip chromium_src-88f570805c4cc7560bf527b8be4b8874740f35c2.tar.gz chromium_src-88f570805c4cc7560bf527b8be4b8874740f35c2.tar.bz2 |
[DevTools] Cleanup DevToolsTarget and DevToolsManagerDelegate after moving to devtools_discovery.
BUG=476496
TBR=jochen
Review URL: https://codereview.chromium.org/1114503002
Cr-Commit-Position: refs/heads/master@{#327300}
Diffstat (limited to 'chromecast')
6 files changed, 3 insertions, 84 deletions
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc index beae0d3..01430da 100644 --- a/chromecast/browser/cast_content_browser_client.cc +++ b/chromecast/browser/cast_content_browser_client.cc @@ -19,7 +19,6 @@ #include "chromecast/browser/cast_network_delegate.h" #include "chromecast/browser/cast_quota_permission_context.h" #include "chromecast/browser/cast_resource_dispatcher_host_delegate.h" -#include "chromecast/browser/devtools/cast_dev_tools_delegate.h" #include "chromecast/browser/geolocation/cast_access_token_store.h" #include "chromecast/browser/media/cma_message_filter_host.h" #include "chromecast/browser/url_request_context_factory.h" @@ -313,11 +312,6 @@ bool CastContentBrowserClient::CanCreateWindow( return false; } -content::DevToolsManagerDelegate* -CastContentBrowserClient::GetDevToolsManagerDelegate() { - return new CastDevToolsManagerDelegate(); -} - void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/chromecast/browser/cast_content_browser_client.h b/chromecast/browser/cast_content_browser_client.h index 193a090..0d25e61 100644 --- a/chromecast/browser/cast_content_browser_client.h +++ b/chromecast/browser/cast_content_browser_client.h @@ -91,7 +91,6 @@ class CastContentBrowserClient: public content::ContentBrowserClient { int render_process_id, int opener_id, bool* no_javascript_access) override; - content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; void GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, diff --git a/chromecast/browser/devtools/cast_dev_tools_delegate.cc b/chromecast/browser/devtools/cast_dev_tools_delegate.cc index 4144727..93f1704 100644 --- a/chromecast/browser/devtools/cast_dev_tools_delegate.cc +++ b/chromecast/browser/devtools/cast_dev_tools_delegate.cc @@ -4,17 +4,7 @@ #include "chromecast/browser/devtools/cast_dev_tools_delegate.h" -#include "base/files/file_path.h" #include "base/macros.h" -#include "base/strings/utf_string_conversions.h" -#include "components/devtools_discovery/devtools_discovery_manager.h" -#include "content/public/browser/devtools_agent_host.h" -#include "content/public/browser/devtools_target.h" -#include "content/public/browser/favicon_status.h" -#include "content/public/browser/navigation_entry.h" -#include "content/public/browser/render_view_host.h" -#include "content/public/browser/web_contents.h" -#include "content/public/browser/web_contents_delegate.h" #include "grit/shell_resources.h" #include "ui/base/resource/resource_bundle.h" @@ -43,37 +33,8 @@ std::string CastDevToolsDelegate::GetFrontendResource( return std::string(); } -// CastDevToolsManagerDelegate ----------------------------------------------- - -CastDevToolsManagerDelegate::CastDevToolsManagerDelegate() { -} - -CastDevToolsManagerDelegate::~CastDevToolsManagerDelegate() { -} - -base::DictionaryValue* CastDevToolsManagerDelegate::HandleCommand( - content::DevToolsAgentHost* agent_host, - base::DictionaryValue* command) { - return NULL; -} - -std::string CastDevToolsManagerDelegate::GetPageThumbnailData( - const GURL& url) { - return ""; -} - -scoped_ptr<content::DevToolsTarget> -CastDevToolsManagerDelegate::CreateNewTarget(const GURL& url) { - return scoped_ptr<content::DevToolsTarget>(); -} - -void CastDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) { - TargetList targets; - devtools_discovery::DevToolsDiscoveryManager* discovery_manager = - devtools_discovery::DevToolsDiscoveryManager::GetInstance(); - for (const auto& descriptor : discovery_manager->GetDescriptors()) - targets.push_back(descriptor); - callback.Run(targets); +std::string CastDevToolsDelegate::GetPageThumbnailData(const GURL& url) { + return std::string(); } } // namespace shell diff --git a/chromecast/browser/devtools/cast_dev_tools_delegate.h b/chromecast/browser/devtools/cast_dev_tools_delegate.h index 38fbfcb..190abec 100644 --- a/chromecast/browser/devtools/cast_dev_tools_delegate.h +++ b/chromecast/browser/devtools/cast_dev_tools_delegate.h @@ -6,17 +6,8 @@ #define CHROMECAST_BROWSER_DEVTOOLS_CAST_DEV_TOOLS_DELEGATE_H_ #include "components/devtools_http_handler/devtools_http_handler_delegate.h" -#include "content/public/browser/devtools_manager_delegate.h" #include "net/socket/stream_listen_socket.h" -namespace base { -class FilePath; -} - -namespace content { -class BrowserContext; -} - namespace chromecast { namespace shell { @@ -29,32 +20,10 @@ class CastDevToolsDelegate : // devtools_http_handler::DevToolsHttpHandlerDelegate implementation. std::string GetDiscoveryPageHTML() override; std::string GetFrontendResource(const std::string& path) override; - - private: - DISALLOW_COPY_AND_ASSIGN(CastDevToolsDelegate); -}; - -class CastDevToolsManagerDelegate : public content::DevToolsManagerDelegate { - public: - CastDevToolsManagerDelegate(); - ~CastDevToolsManagerDelegate() override; - - // DevToolsManagerDelegate implementation. - void Inspect( - content::BrowserContext* browser_context, - content::DevToolsAgentHost* agent_host) override {} - void DevToolsAgentStateChanged( - content::DevToolsAgentHost* agent_host, - bool attached) override {} - base::DictionaryValue* HandleCommand( - content::DevToolsAgentHost* agent_host, - base::DictionaryValue* command) override; - scoped_ptr<content::DevToolsTarget> CreateNewTarget(const GURL& url) override; - void EnumerateTargets(TargetCallback callback) override; std::string GetPageThumbnailData(const GURL& url) override; private: - DISALLOW_COPY_AND_ASSIGN(CastDevToolsManagerDelegate); + DISALLOW_COPY_AND_ASSIGN(CastDevToolsDelegate); }; } // namespace shell diff --git a/chromecast/browser/devtools/remote_debugging_server.cc b/chromecast/browser/devtools/remote_debugging_server.cc index 3b78e38b..6391b6d 100644 --- a/chromecast/browser/devtools/remote_debugging_server.cc +++ b/chromecast/browser/devtools/remote_debugging_server.cc @@ -148,12 +148,10 @@ void RemoteDebuggingServer::OnPortChanged() { port_ = new_port; if (port_ > 0) { - manager_delegate_.reset(new CastDevToolsManagerDelegate()); devtools_http_handler_.reset(new DevToolsHttpHandler( CreateSocketFactory(port_), GetFrontendUrl(), new CastDevToolsDelegate(), - manager_delegate_.get(), base::FilePath(), base::FilePath(), std::string(), diff --git a/chromecast/browser/devtools/remote_debugging_server.h b/chromecast/browser/devtools/remote_debugging_server.h index 2d9e48e..399b344 100644 --- a/chromecast/browser/devtools/remote_debugging_server.h +++ b/chromecast/browser/devtools/remote_debugging_server.h @@ -30,8 +30,6 @@ class RemoteDebuggingServer { // on device startup. bool ShouldStartImmediately(); - // TODO(dgozman): remove once devtools_discovery component is extracted. - scoped_ptr<CastDevToolsManagerDelegate> manager_delegate_; scoped_ptr<devtools_http_handler::DevToolsHttpHandler> devtools_http_handler_; IntegerPrefMember pref_port_; |