Index: content/browser/frame_host/render_frame_proxy_host.h |
diff --git a/content/browser/frame_host/render_frame_proxy_host.h b/content/browser/frame_host/render_frame_proxy_host.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c854613d39666b3a0f0d1f74e917594e02d412de |
--- /dev/null |
+++ b/content/browser/frame_host/render_frame_proxy_host.h |
@@ -0,0 +1,50 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
+#define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "content/browser/frame_host/render_frame_host_impl.h" |
+ |
+class RenderProcessHost; |
+class RenderFrameHostImpl; |
+class RenderViewHostImpl; |
+ |
+namespace content { |
+ |
+class RenderFrameProxyHost { |
Charlie Reis
2014/03/31 23:22:35
This class needs a big helpful comment. Some thin
nasko
2014/04/09 17:52:01
Done.
|
+ public: |
+ explicit RenderFrameProxyHost( |
+ scoped_ptr<RenderFrameHostImpl> render_frame_host); |
+ ~RenderFrameProxyHost(); |
+ |
+ RenderProcessHost* GetProcess() { |
+ DCHECK(render_frame_host_.get()); |
Charlie Reis
2014/03/31 23:22:35
This is kind of redundant, since we'll crash on th
nasko
2014/04/09 17:52:01
Done.
|
+ return render_frame_host_->GetProcess(); |
+ } |
+ RenderFrameHostImpl* render_frame_host() { |
+ return render_frame_host_.get(); |
+ } |
+ RenderViewHostImpl* render_view_host() { |
+ if (render_frame_host_) |
Charlie Reis
2014/03/31 23:22:35
When is this not null? Does the RFPH ever outlive
nasko
2014/04/09 17:52:01
Done.
|
+ return render_frame_host_->render_view_host(); |
+ return NULL; |
+ } |
+ scoped_ptr<RenderFrameHostImpl> PassFrameHost() { |
+ return render_frame_host_.Pass(); |
+ } |
+ |
+ private: |
+ |
+ // TODO(nasko): For now, hide the RenderFrameHost inside the proxy, but remove |
+ // it once we have all the code support for proper proxy objects. |
+ scoped_ptr<RenderFrameHostImpl> render_frame_host_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); |
+}; |
+ |
+} // namespace |
+ |
+#endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |