| 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_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 class RenderProcessHost; |
| 13 class RenderViewHostImpl; | 14 class RenderViewHostImpl; |
| 14 | 15 |
| 15 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { | 16 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| 16 public: | 17 public: |
| 17 RenderFrameHostImpl( | 18 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
| 18 RenderViewHostImpl* render_view_host, | 19 |
| 19 int routing_id, | 20 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, |
| 20 bool swapped_out); | 21 int routing_id, |
| 22 bool is_swapped_out); |
| 21 virtual ~RenderFrameHostImpl(); | 23 virtual ~RenderFrameHostImpl(); |
| 22 | 24 |
| 23 // IPC::Sender | 25 // IPC::Sender |
| 24 virtual bool Send(IPC::Message* msg) OVERRIDE; | 26 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 25 | 27 |
| 26 // IPC::Listener | 28 // IPC::Listener |
| 27 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 29 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 28 | 30 |
| 29 int routing_id() { return routing_id_; } | 31 void Init(); |
| 32 RenderProcessHost* GetProcess() const; |
| 33 int routing_id() const { return routing_id_; } |
| 30 | 34 |
| 31 private: | 35 private: |
| 32 RenderViewHostImpl* render_view_host_; | 36 bool is_swapped_out() { return is_swapped_out_; } |
| 33 | 37 |
| 38 RenderViewHostImpl* render_view_host_; // Not owned. Outlives this object. |
| 34 int routing_id_; | 39 int routing_id_; |
| 40 bool is_swapped_out_; |
| 35 | 41 |
| 36 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 42 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 37 }; | 43 }; |
| 38 | 44 |
| 39 } // namespace content | 45 } // namespace content |
| 40 | 46 |
| 41 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 47 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |