| 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 "base/containers/hash_tables.h" |
| 10 #include "base/lazy_instance.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 11 #include "content/public/browser/render_frame_host.h" |
| 10 | 12 |
| 11 namespace content { | 13 namespace content { |
| 12 | 14 |
| 15 class RenderViewHost; |
| 13 class RenderViewHostImpl; | 16 class RenderViewHostImpl; |
| 17 class RenderFrameHostImpl; |
| 14 | 18 |
| 15 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { | 19 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { |
| 16 public: | 20 public: |
| 21 static RenderFrameHostImpl* FromID(int process_id, int routing_id); |
| 22 |
| 17 RenderFrameHostImpl( | 23 RenderFrameHostImpl( |
| 18 RenderViewHostImpl* render_view_host, | 24 RenderViewHostImpl* render_view_host, |
| 19 int routing_id, | 25 int routing_id, |
| 20 bool swapped_out); | 26 bool swapped_out); |
| 21 virtual ~RenderFrameHostImpl(); | 27 virtual ~RenderFrameHostImpl(); |
| 22 | 28 |
| 29 // RenderFrameHost methods |
| 30 virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; |
| 31 virtual int GetRoutingID() const OVERRIDE; |
| 32 |
| 23 // IPC::Sender | 33 // IPC::Sender |
| 24 virtual bool Send(IPC::Message* msg) OVERRIDE; | 34 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 25 | 35 |
| 26 // IPC::Listener | 36 // IPC::Listener |
| 27 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 37 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 28 | 38 |
| 29 int routing_id() { return routing_id_; } | 39 int routing_id() { return routing_id_; } |
| 30 | 40 |
| 31 private: | 41 private: |
| 32 RenderViewHostImpl* render_view_host_; | 42 RenderViewHostImpl* render_view_host_; |
| 33 | 43 |
| 34 int routing_id_; | 44 int routing_id_; |
| 35 | 45 |
| 36 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 46 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
| 37 }; | 47 }; |
| 38 | 48 |
| 39 } // namespace content | 49 } // namespace content |
| 40 | 50 |
| 41 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ | 51 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ |
| OLD | NEW |