| OLD | NEW |
| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Returns true iff an instance of DevToolsAgentHost for the |rvh| | 31 // Returns true iff an instance of DevToolsAgentHost for the |rvh| |
| 32 // does exist. | 32 // does exist. |
| 33 static bool HasFor(RenderViewHost* rvh); | 33 static bool HasFor(RenderViewHost* rvh); |
| 34 | 34 |
| 35 // Returns DevToolsAgentHost that can be used for inspecting shared worker | 35 // Returns DevToolsAgentHost that can be used for inspecting shared worker |
| 36 // with given worker process host id and routing id. | 36 // with given worker process host id and routing id. |
| 37 static scoped_refptr<DevToolsAgentHost> GetForWorker(int worker_process_id, | 37 static scoped_refptr<DevToolsAgentHost> GetForWorker(int worker_process_id, |
| 38 int worker_route_id); | 38 int worker_route_id); |
| 39 | 39 |
| 40 // Returns true iff an instance of DevToolsAgentHost exists for the shared | |
| 41 // worker with given process host id and routing id. | |
| 42 static bool HasForWorker(int worker_process_id, | |
| 43 int worker_route_id); | |
| 44 | |
| 45 static bool IsDebuggerAttached(WebContents* web_contents); | 40 static bool IsDebuggerAttached(WebContents* web_contents); |
| 46 | 41 |
| 47 // Returns a list of all existing RenderViewHost's that can be debugged. | 42 // Returns a list of all existing RenderViewHost's that can be debugged. |
| 48 static std::vector<RenderViewHost*> GetValidRenderViewHosts(); | 43 static std::vector<RenderViewHost*> GetValidRenderViewHosts(); |
| 49 | 44 |
| 50 // Returns true if there is a client attached. | 45 // Returns true if there is a client attached. |
| 51 virtual bool IsAttached() = 0; | 46 virtual bool IsAttached() = 0; |
| 52 | 47 |
| 53 // Starts inspecting element at position (|x|, |y|) in the specified page. | 48 // Starts inspecting element at position (|x|, |y|) in the specified page. |
| 54 virtual void InspectElement(int x, int y) = 0; | 49 virtual void InspectElement(int x, int y) = 0; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 67 virtual void ConnectRenderViewHost(RenderViewHost* rvh) = 0; | 62 virtual void ConnectRenderViewHost(RenderViewHost* rvh) = 0; |
| 68 | 63 |
| 69 protected: | 64 protected: |
| 70 friend class base::RefCounted<DevToolsAgentHost>; | 65 friend class base::RefCounted<DevToolsAgentHost>; |
| 71 virtual ~DevToolsAgentHost() {} | 66 virtual ~DevToolsAgentHost() {} |
| 72 }; | 67 }; |
| 73 | 68 |
| 74 } // namespace content | 69 } // namespace content |
| 75 | 70 |
| 76 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 71 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |