Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1183)

Unified Diff: content/public/browser/devtools_http_handler_delegate.h

Issue 24995003: DevTools: Extract target discovery and manipulation from DevToolsHttpHandlerImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang compile and a minor bug Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/devtools_http_handler_delegate.h
diff --git a/content/public/browser/devtools_http_handler_delegate.h b/content/public/browser/devtools_http_handler_delegate.h
index 3e1d6412820eb17923b1b366d2b8eb33d1b42c1c..0018f285519687074c5062f06d5c5345db132f9d 100644
--- a/content/public/browser/devtools_http_handler_delegate.h
+++ b/content/public/browser/devtools_http_handler_delegate.h
@@ -10,23 +10,20 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
+#include "content/public/browser/devtools_target.h"
jam 2013/10/01 17:20:51 do you need this or can you just forward declare D
Vladislav Kaznacheev 2013/10/02 10:28:29 Used forward declaration.
#include "net/socket/stream_listen_socket.h"
class GURL;
namespace content {
-class RenderViewHost;
-
class DevToolsHttpHandlerDelegate {
public:
- enum TargetType {
- kTargetTypeTab = 0,
- kTargetTypeOther,
- };
-
virtual ~DevToolsHttpHandlerDelegate() {}
+ typedef std::vector<scoped_refptr<DevToolsTarget> > TargetList;
+ typedef base::Callback<void(const TargetList&)> TargetCallback;
jam 2013/10/01 17:20:51 nit: the convention for the content api is to list
Vladislav Kaznacheev 2013/10/02 10:28:29 Done.
+
// Should return discovery page HTML that should list available tabs
// and provide attach links.
virtual std::string GetDiscoveryPageHTML() = 0;
@@ -41,14 +38,11 @@ class DevToolsHttpHandlerDelegate {
// thumbnail.
virtual std::string GetPageThumbnailData(const GURL& url) = 0;
- // Creates new inspectable target and returns its render view host.
- virtual RenderViewHost* CreateNewTarget() = 0;
-
- // Returns the type of the target.
- virtual TargetType GetTargetType(RenderViewHost*) = 0;
+ // Creates new inspectable target.
+ virtual scoped_refptr<DevToolsTarget> CreateNewTarget() = 0;
- // Provides the delegate with an ability to supply a description for views.
- virtual std::string GetViewDescription(content::RenderViewHost*) = 0;
+ // Requests the list of all inspectable targets.
+ virtual void EnumerateTargets(TargetCallback callback) = 0;
// Creates named socket for reversed tethering implementation (used with
// remote debugging, primarily for mobile).

Powered by Google App Engine
This is Rietveld 408576698