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

Unified Diff: content/public/browser/render_process_host.h

Issue 1380573003: Remove 2-stage RenderWidget initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix racy test Created 5 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/common/view_messages.h ('k') | content/public/browser/render_process_host_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/render_process_host.h
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index e7d35a7f42eba82f06ebc67b8deaec8aaa071574..9c93ed0cf2d675bd1cf774add2aff83eb1ee9bb7 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -114,8 +114,10 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
// Try to shut down the associated renderer process without running unload
// handlers, etc, giving it the specified exit code. If |wait| is true, wait
- // for the process to be actually terminated before returning.
- // Returns true if it was able to shut down.
+ // for the process to be actually terminated before returning. Returns true
+ // if it was able to shut down. On Windows, this must not be called before
+ // RenderProcessReady was called on a RenderProcessHostObserver, otherwise
+ // RenderProcessExited may never be called.
virtual bool Shutdown(int exit_code, bool wait) = 0;
// Try to shut down the associated renderer process as fast as possible.
@@ -133,9 +135,19 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
//
// NOTE: this is not necessarily valid immediately after calling Init, as
// Init starts the process asynchronously. It's guaranteed to be valid after
- // the first IPC arrives.
+ // the first IPC arrives or RenderProcessReady was called on a
+ // RenderProcessHostObserver for this. At that point, IsReady() returns true.
virtual base::ProcessHandle GetHandle() const = 0;
+ // Returns whether the process is ready. The process is ready once both
+ // conditions (which can happen in arbitrary order) are true:
+ // 1- the launcher reported a succesful launch
+ // 2- the channel is connected.
+ //
+ // After that point, GetHandle() is valid, and deferred messages have been
+ // sent.
+ virtual bool IsReady() const = 0;
+
// Returns the user browser context associated with this renderer process.
virtual content::BrowserContext* GetBrowserContext() const = 0;
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/browser/render_process_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698