Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: content/browser/frame_host/render_frame_proxy_host.h

Issue 217163007: Introduce RenderFrameProxyHost object and use it in RFHM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A gross hack to fix CancelPending. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698