From 852b34ba3a6d5186ea532c16163168d1d5e24b2e Mon Sep 17 00:00:00 2001 From: "kaznacheev@chromium.org" Date: Thu, 3 Oct 2013 16:29:06 +0000 Subject: DevTools: Extract target discovery and manipulation from DevToolsHttpHandlerImpl Target discovery has moved into DevToolsHttpHandlerDelegate. The new DevToolsTarget interface is introduced to encapsulate access to target details (id, title, url etc) and manipulation (activate, close, inspect). It is now possible to have an implementation of DevToolsTarget tied to a tab id instead of a RenderViewHost instance (which is the prerequisite for fixing the referenced bug). BUG=272174 Review URL: https://codereview.chromium.org/24995003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226771 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/devtools/devtools_http_handler_unittest.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'content/browser/devtools/devtools_http_handler_unittest.cc') diff --git a/content/browser/devtools/devtools_http_handler_unittest.cc b/content/browser/devtools/devtools_http_handler_unittest.cc index a57c4cc..cc751f0 100644 --- a/content/browser/devtools/devtools_http_handler_unittest.cc +++ b/content/browser/devtools/devtools_http_handler_unittest.cc @@ -7,6 +7,7 @@ #include "content/browser/browser_thread_impl.h" #include "content/public/browser/devtools_http_handler.h" #include "content/public/browser/devtools_http_handler_delegate.h" +#include "content/public/browser/devtools_target.h" #include "net/socket/stream_listen_socket.h" #include "testing/gtest/include/gtest/gtest.h" @@ -64,12 +65,11 @@ class DummyDelegate : public DevToolsHttpHandlerDelegate { virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE { return std::string(); } - virtual RenderViewHost* CreateNewTarget() OVERRIDE { return NULL; } - virtual TargetType GetTargetType(RenderViewHost*) OVERRIDE { - return kTargetTypeTab; + virtual scoped_ptr CreateNewTarget() OVERRIDE { + return scoped_ptr(); } - virtual std::string GetViewDescription(content::RenderViewHost*) OVERRIDE { - return std::string(); + virtual void EnumerateTargets(TargetCallback callback) OVERRIDE { + callback.Run(TargetList()); } virtual scoped_ptr CreateSocketForTethering( net::StreamListenSocket::Delegate* delegate, -- cgit v1.1