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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2857263003: Task Manager should listen to WebContentsObserver::RenderFrameCreated. (Closed)
Patch Set: Tweaked the comments as suggested in the CR feedback Created 3 years, 7 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/renderer_host/render_view_host_impl.h ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 083e53b5c6842c9ea688b372458141dc20bf914d..6ddcb20cac98ceb3e1028c8499fabd0136933c9f 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -210,7 +210,6 @@ RenderViewHostImpl::RenderViewHostImpl(
sudden_termination_allowed_(false),
render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING),
updating_web_preferences_(false),
- render_view_ready_on_process_launch_(false),
weak_factory_(this) {
DCHECK(instance_.get());
CHECK(delegate_); // http://crbug.com/82827
@@ -616,13 +615,6 @@ void RenderViewHostImpl::ClosePageIgnoringUnloadEvents() {
delegate_->Close(this);
}
-void RenderViewHostImpl::RenderProcessReady(RenderProcessHost* host) {
- if (render_view_ready_on_process_launch_) {
- render_view_ready_on_process_launch_ = false;
- RenderViewReady();
- }
-}
-
void RenderViewHostImpl::RenderProcessExited(RenderProcessHost* host,
base::TerminationStatus status,
int exit_code) {
@@ -945,18 +937,12 @@ void RenderViewHostImpl::SelectWordAroundCaret() {
}
void RenderViewHostImpl::PostRenderViewReady() {
- if (GetProcess()->IsReady()) {
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&RenderViewHostImpl::RenderViewReady,
- weak_factory_.GetWeakPtr()));
- } else {
- render_view_ready_on_process_launch_ = true;
- }
+ GetProcess()->PostTaskWhenProcessIsReady(base::Bind(
+ &RenderViewHostImpl::RenderViewReady, weak_factory_.GetWeakPtr()));
}
void RenderViewHostImpl::RenderViewReady() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
delegate_->RenderViewReady(this);
}
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/public/browser/render_frame_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698