| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "ipc/ipc_listener.h" | 9 #include "ipc/ipc_listener.h" |
| 10 #include "ipc/ipc_sender.h" | 10 #include "ipc/ipc_sender.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 class RenderProcessHost; |
| 13 | 14 |
| 14 // The interface provides a communication conduit with a frame in the renderer. | 15 // The interface provides a communication conduit with a frame in the renderer. |
| 15 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, | 16 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
| 16 public IPC::Sender { | 17 public IPC::Sender { |
| 17 public: | 18 public: |
| 19 // Returns the RenderFrameHost given its ID and the ID of its render process. |
| 20 // Returns NULL if the IDs do not correspond to a live RenderFrameHost. |
| 21 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); |
| 22 |
| 18 virtual ~RenderFrameHost() {} | 23 virtual ~RenderFrameHost() {} |
| 19 | 24 |
| 25 // Returns the process for this frame. |
| 26 virtual RenderProcessHost* GetProcess() = 0; |
| 27 |
| 20 // Returns the route id for this frame. | 28 // Returns the route id for this frame. |
| 21 virtual int GetRoutingID() = 0; | 29 virtual int GetRoutingID() = 0; |
| 22 | 30 |
| 23 private: | 31 private: |
| 24 // This interface should only be implemented inside content. | 32 // This interface should only be implemented inside content. |
| 25 friend class RenderFrameHostImpl; | 33 friend class RenderFrameHostImpl; |
| 26 RenderFrameHost() {} | 34 RenderFrameHost() {} |
| 27 }; | 35 }; |
| 28 | 36 |
| 29 } // namespace content | 37 } // namespace content |
| 30 | 38 |
| 31 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 39 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
| OLD | NEW |