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 #include "ui/gfx/native_widget_types.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 class RenderProcessHost; | 14 class RenderProcessHost; |
| 15 class SiteInstance; |
14 | 16 |
15 // The interface provides a communication conduit with a frame in the renderer. | 17 // The interface provides a communication conduit with a frame in the renderer. |
16 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, | 18 class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, |
17 public IPC::Sender { | 19 public IPC::Sender { |
18 public: | 20 public: |
19 // Returns the RenderFrameHost given its ID and the ID of its render process. | 21 // 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. | 22 // Returns NULL if the IDs do not correspond to a live RenderFrameHost. |
21 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); | 23 static RenderFrameHost* FromID(int render_process_id, int render_frame_id); |
22 | 24 |
23 virtual ~RenderFrameHost() {} | 25 virtual ~RenderFrameHost() {} |
24 | 26 |
| 27 virtual SiteInstance* GetSiteInstance() = 0; |
| 28 |
25 // Returns the process for this frame. | 29 // Returns the process for this frame. |
26 virtual RenderProcessHost* GetProcess() = 0; | 30 virtual RenderProcessHost* GetProcess() = 0; |
27 | 31 |
28 // Returns the route id for this frame. | 32 // Returns the route id for this frame. |
29 virtual int GetRoutingID() = 0; | 33 virtual int GetRoutingID() = 0; |
30 | 34 |
| 35 // Returns the associated widget's native view. |
| 36 virtual gfx::NativeView GetNativeView() = 0; |
| 37 |
31 private: | 38 private: |
32 // This interface should only be implemented inside content. | 39 // This interface should only be implemented inside content. |
33 friend class RenderFrameHostImpl; | 40 friend class RenderFrameHostImpl; |
34 RenderFrameHost() {} | 41 RenderFrameHost() {} |
35 }; | 42 }; |
36 | 43 |
37 } // namespace content | 44 } // namespace content |
38 | 45 |
39 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ | 46 #endif // CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ |
OLD | NEW |