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

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

Issue 552683004: Fix IsRenderFrameLive and use it in RenderFrameHostManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix OpenURLSubframe test Created 6 years, 3 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
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 7ce2fd014f2194966bc6f38413dcc6a93d17f3dc..1d814e81cd020b163bfbde568be6d101ea81f54c 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
@@ -114,9 +115,21 @@ class CONTENT_EXPORT RenderFrameHostImpl
int accessibility_node_id) OVERRIDE;
virtual BrowserAccessibility* AccessibilityGetParentFrame() OVERRIDE;
+ // Creates a RenderFrame in the renderer process. Only called for
+ // cross-process subframe navigations in --site-per-process.
bool CreateRenderFrame(int parent_routing_id);
+
+ // Returns whether the RenderFrame in the renderer process has been created
+ // and still has a connection. This is valid for all frames.
bool IsRenderFrameLive();
+ // Tracks whether the RenderFrame for this RenderFrameHost has been created in
+ // the renderer process. This is currently only used for subframes.
+ // TODO(creis): Use this for main frames as well when RVH goes away.
+ void set_render_frame_created(bool created) {
+ render_frame_created_ = created;
+ }
+
// Called for renderer-created windows to resume requests from this frame,
// after they are blocked in RenderWidgetHelper::CreateNewWindow.
void Init();
@@ -310,6 +323,8 @@ class CONTENT_EXPORT RenderFrameHostImpl
friend class TestRenderFrameHost;
friend class TestRenderViewHost;
+ FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, CrashSubframe);
+
// IPC Message handlers.
void OnAddMessageToConsole(int32 level,
const base::string16& message,
@@ -440,7 +455,11 @@ class CONTENT_EXPORT RenderFrameHostImpl
int routing_id_;
bool is_swapped_out_;
- bool renderer_initialized_;
+
+ // Tracks whether the RenderFrame for this RenderFrameHost has been created in
+ // the renderer process. Currently only used for subframes.
+ // TODO(creis): Use this for main frames as well when RVH goes away.
+ bool render_frame_created_;
// Whether we should buffer outgoing Navigate messages rather than sending
// them. This will be true when a RenderFrameHost is created for a cross-site
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698