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

Side by Side Diff: content/public/browser/devtools_agent_host.h

Issue 12319114: Extract debugger target enumeration into a separate class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@debugger
Patch Set: Cleaner version ready for review Created 7 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "googleurl/src/gurl.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 class RenderViewHost; 17 class RenderViewHost;
17 class WebContents; 18 class WebContents;
18 19
19 // Describes interface for managing devtools agents from browser process. 20 // Describes interface for managing devtools agents from browser process.
20 class CONTENT_EXPORT DevToolsAgentHost 21 class CONTENT_EXPORT DevToolsAgentHost
21 : public base::RefCounted<DevToolsAgentHost> { 22 : public base::RefCounted<DevToolsAgentHost> {
22 public: 23 public:
(...skipping 15 matching lines...) Expand all
38 // Detaches given |rvh| from the agent host temporarily and returns a cookie 39 // Detaches given |rvh| from the agent host temporarily and returns a cookie
39 // that allows to reattach another rvh to that agen thost later. Returns -1 if 40 // that allows to reattach another rvh to that agen thost later. Returns -1 if
40 // there is no agent host associated with the |rvh|. 41 // there is no agent host associated with the |rvh|.
41 static int DisconnectRenderViewHost(RenderViewHost* rvh); 42 static int DisconnectRenderViewHost(RenderViewHost* rvh);
42 43
43 // Reattaches agent host detached with DisconnectRenderViewHost method above 44 // Reattaches agent host detached with DisconnectRenderViewHost method above
44 // to |rvh|. 45 // to |rvh|.
45 static void ConnectRenderViewHost(int agent_host_cookie, 46 static void ConnectRenderViewHost(int agent_host_cookie,
46 RenderViewHost* rvh); 47 RenderViewHost* rvh);
47 48
49 // Returns agent unique id.
50 virtual int id() = 0;
51
52 // Returns true if the debugger is attached.
53 virtual bool attached() = 0;
54
55 // Returns page title.
56 virtual std::string title() = 0;
57
58 // Returns the page url.
59 virtual GURL url() = 0;
60
61 // Returns thumbnail url for the page.
62 virtual GURL thumbnail_url() = 0;
63
64 // Returns favicon url for the page.
65 virtual GURL favicon_url() = 0;
66
48 // Returns render view host instance for this host if any. 67 // Returns render view host instance for this host if any.
49 virtual RenderViewHost* GetRenderViewHost() = 0; 68 virtual RenderViewHost* GetRenderViewHost() = 0;
50 69
51 protected: 70 protected:
52 friend class base::RefCounted<DevToolsAgentHost>; 71 friend class base::RefCounted<DevToolsAgentHost>;
53 virtual ~DevToolsAgentHost() {} 72 virtual ~DevToolsAgentHost() {}
54 }; 73 };
55 74
56 } // namespace content 75 } // namespace content
57 76
58 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ 77 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698