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

Side by Side Diff: content/browser/devtools/devtools_agent_host_impl.h

Issue 349033009: DevTools: Added service workers to chrome://inspect/#devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed lifetime again Created 6 years, 5 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_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/public/browser/devtools_agent_host.h" 12 #include "content/public/browser/devtools_agent_host.h"
13 13
14 namespace IPC { 14 namespace IPC {
15 class Message; 15 class Message;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 19
20 // Describes interface for managing devtools agents from the browser process. 20 // Describes interface for managing devtools agents from the browser process.
21 class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost { 21 class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
22 public: 22 public:
23 class CONTENT_EXPORT CloseListener { 23 class CONTENT_EXPORT CloseListener {
24 public: 24 public:
25 virtual void AgentHostClosing(DevToolsAgentHostImpl*) = 0; 25 virtual void AgentHostClosing(DevToolsAgentHostImpl*) = 0;
26 protected: 26 protected:
27 virtual ~CloseListener() {} 27 virtual ~CloseListener() {}
28 }; 28 };
29 29
30 // Returns a list of all existing RenderViewHost's that can be debugged.
31 static std::vector<RenderViewHost*> GetValidRenderViewHosts();
32
30 // Informs the hosted agent that a client host has attached. 33 // Informs the hosted agent that a client host has attached.
31 virtual void Attach() = 0; 34 virtual void Attach() = 0;
32 35
33 // Informs the hosted agent that a client host has detached. 36 // Informs the hosted agent that a client host has detached.
34 virtual void Detach() = 0; 37 virtual void Detach() = 0;
35 38
36 // Sends a message to the agent hosted by this object. 39 // Sends a message to the agent hosted by this object.
37 virtual void DispatchOnInspectorBackend(const std::string& message) = 0; 40 virtual void DispatchOnInspectorBackend(const std::string& message) = 0;
38 41
39 void set_close_listener(CloseListener* listener) { 42 void set_close_listener(CloseListener* listener) {
40 close_listener_ = listener; 43 close_listener_ = listener;
41 } 44 }
42 45
43 // DevToolsAgentHost implementation. 46 // DevToolsAgentHost implementation.
44 virtual bool IsAttached() OVERRIDE; 47 virtual bool IsAttached() OVERRIDE;
45 48
46 virtual void InspectElement(int x, int y) OVERRIDE; 49 virtual void InspectElement(int x, int y) OVERRIDE;
47 50
48 virtual std::string GetId() OVERRIDE; 51 virtual std::string GetId() OVERRIDE;
49 52
50 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; 53 virtual RenderViewHost* GetRenderViewHost() OVERRIDE;
51 54
52 virtual void DisconnectRenderViewHost() OVERRIDE; 55 virtual void DisconnectRenderViewHost() OVERRIDE;
53 56
54 virtual void ConnectRenderViewHost(RenderViewHost* rvh) OVERRIDE; 57 virtual void ConnectRenderViewHost(RenderViewHost* rvh) OVERRIDE;
55 58
56 virtual bool IsWorker() const OVERRIDE; 59 virtual bool IsWorker() const OVERRIDE;
57 60
61 virtual GURL GetURL() OVERRIDE;
62
58 protected: 63 protected:
59 DevToolsAgentHostImpl(); 64 DevToolsAgentHostImpl();
60 virtual ~DevToolsAgentHostImpl(); 65 virtual ~DevToolsAgentHostImpl();
61 66
62 void NotifyCloseListener(); 67 void NotifyCloseListener();
63 68
64 private: 69 private:
65 CloseListener* close_listener_; 70 CloseListener* close_listener_;
66 const std::string id_; 71 const std::string id_;
67 }; 72 };
68 73
69 } // namespace content 74 } // namespace content
70 75
71 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_ 76 #endif // CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_AGENT_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_targets_ui.cc ('k') | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698