 Chromium Code Reviews
 Chromium Code Reviews Issue 2484793002:
  Remove access to WebContents in RWHVA::SynchronousFrameMetadata()  (Closed)
    
  
    Issue 2484793002:
  Remove access to WebContents in RWHVA::SynchronousFrameMetadata()  (Closed) 
  | 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 <memory> | 8 #include <memory> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 | 57 | 
| 58 // Returns DevToolsAgentHost that can be used for inspecting |web_contents|. | 58 // Returns DevToolsAgentHost that can be used for inspecting |web_contents|. | 
| 59 // A new DevToolsAgentHost will be created if it does not exist. | 59 // A new DevToolsAgentHost will be created if it does not exist. | 
| 60 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( | 60 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( | 
| 61 WebContents* web_contents); | 61 WebContents* web_contents); | 
| 62 | 62 | 
| 63 // Returns DevToolsAgentHost that can be used for inspecting |frame_host|. | 63 // Returns DevToolsAgentHost that can be used for inspecting |frame_host|. | 
| 64 // A new DevToolsAgentHost will be created if it does not exist. | 64 // A new DevToolsAgentHost will be created if it does not exist. | 
| 65 // For main frame cases, prefer using the above method which takes WebContents | 65 // For main frame cases, prefer using the above method which takes WebContents | 
| 66 // instead. | 66 // instead. | 
| 67 // TODO(dgozman): this is a temporary measure until we can inspect | 67 // TODO(dgozman): this is a temporary measure until we can inspect | 
| 
boliu
2016/11/08 00:13:55
says here accessor for RFH is temporary, perhaps w
 
Jinsuk Kim
2016/11/08 17:58:19
Granted, I just dgozman would take care of my addi
 | |
| 68 // cross-process subframes within a single agent. | 68 // cross-process subframes within a single agent. | 
| 69 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( | 69 static scoped_refptr<DevToolsAgentHost> GetOrCreateFor( | 
| 70 RenderFrameHost* frame_host); | 70 RenderFrameHost* frame_host); | 
| 71 | 71 | 
| 72 // Returns true iff an instance of DevToolsAgentHost for the |web_contents| | 72 // Returns true iff an instance of DevToolsAgentHost for the |web_contents| | 
| 73 // does exist. | 73 // does exist. | 
| 74 static bool HasFor(WebContents* web_contents); | 74 static bool HasFor(WebContents* web_contents); | 
| 75 static bool HasFor(RenderFrameHost* frame_host); | |
| 
boliu
2016/11/08 00:13:55
parameter overloading is not allowed by style guid
 
Jinsuk Kim
2016/11/08 17:58:19
Moved to RenderFrameDevToolsAgentHost.
 | |
| 75 | 76 | 
| 76 // Returns DevToolsAgentHost that can be used for inspecting shared worker | 77 // Returns DevToolsAgentHost that can be used for inspecting shared worker | 
| 77 // with given worker process host id and routing id. | 78 // with given worker process host id and routing id. | 
| 78 static scoped_refptr<DevToolsAgentHost> GetForWorker(int worker_process_id, | 79 static scoped_refptr<DevToolsAgentHost> GetForWorker(int worker_process_id, | 
| 79 int worker_route_id); | 80 int worker_route_id); | 
| 80 | 81 | 
| 81 // Creates DevToolsAgentHost that communicates to the target by means of | 82 // Creates DevToolsAgentHost that communicates to the target by means of | 
| 82 // provided |delegate|. |delegate| ownership is passed to the created agent | 83 // provided |delegate|. |delegate| ownership is passed to the created agent | 
| 83 // host. | 84 // host. | 
| 84 static scoped_refptr<DevToolsAgentHost> Forward( | 85 static scoped_refptr<DevToolsAgentHost> Forward( | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 static void DetachAllClients(); | 207 static void DetachAllClients(); | 
| 207 | 208 | 
| 208 protected: | 209 protected: | 
| 209 friend class base::RefCounted<DevToolsAgentHost>; | 210 friend class base::RefCounted<DevToolsAgentHost>; | 
| 210 virtual ~DevToolsAgentHost() {} | 211 virtual ~DevToolsAgentHost() {} | 
| 211 }; | 212 }; | 
| 212 | 213 | 
| 213 } // namespace content | 214 } // namespace content | 
| 214 | 215 | 
| 215 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 216 #endif // CONTENT_PUBLIC_BROWSER_DEVTOOLS_AGENT_HOST_H_ | 
| OLD | NEW |