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

Side by Side 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, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Returns the storage partition associated with this process. 108 // Returns the storage partition associated with this process.
109 // 109 //
110 // TODO(nasko): Remove this function from the public API once 110 // TODO(nasko): Remove this function from the public API once
111 // URLRequestContextGetter's creation is moved into StoragePartition. 111 // URLRequestContextGetter's creation is moved into StoragePartition.
112 // http://crbug.com/158595 112 // http://crbug.com/158595
113 virtual StoragePartition* GetStoragePartition() const = 0; 113 virtual StoragePartition* GetStoragePartition() const = 0;
114 114
115 // Try to shut down the associated renderer process without running unload 115 // Try to shut down the associated renderer process without running unload
116 // handlers, etc, giving it the specified exit code. If |wait| is true, wait 116 // handlers, etc, giving it the specified exit code. If |wait| is true, wait
117 // for the process to be actually terminated before returning. 117 // for the process to be actually terminated before returning. Returns true
118 // Returns true if it was able to shut down. 118 // if it was able to shut down. On Windows, this must not be called before
119 // RenderProcessReady was called on a RenderProcessHostObserver, otherwise
120 // RenderProcessExited may never be called.
119 virtual bool Shutdown(int exit_code, bool wait) = 0; 121 virtual bool Shutdown(int exit_code, bool wait) = 0;
120 122
121 // Try to shut down the associated renderer process as fast as possible. 123 // Try to shut down the associated renderer process as fast as possible.
122 // If this renderer has any RenderViews with unload handlers, then this 124 // If this renderer has any RenderViews with unload handlers, then this
123 // function does nothing. 125 // function does nothing.
124 // Returns true if it was able to do fast shutdown. 126 // Returns true if it was able to do fast shutdown.
125 virtual bool FastShutdownIfPossible() = 0; 127 virtual bool FastShutdownIfPossible() = 0;
126 128
127 // Returns true if fast shutdown was started for the renderer. 129 // Returns true if fast shutdown was started for the renderer.
128 virtual bool FastShutdownStarted() const = 0; 130 virtual bool FastShutdownStarted() const = 0;
129 131
130 // Returns the process object associated with the child process. In certain 132 // Returns the process object associated with the child process. In certain
131 // tests or single-process mode, this will actually represent the current 133 // tests or single-process mode, this will actually represent the current
132 // process. 134 // process.
133 // 135 //
134 // NOTE: this is not necessarily valid immediately after calling Init, as 136 // NOTE: this is not necessarily valid immediately after calling Init, as
135 // Init starts the process asynchronously. It's guaranteed to be valid after 137 // Init starts the process asynchronously. It's guaranteed to be valid after
136 // the first IPC arrives. 138 // the first IPC arrives or RenderProcessReady was called on a
139 // RenderProcessHostObserver for this. At that point, IsReady() returns true.
137 virtual base::ProcessHandle GetHandle() const = 0; 140 virtual base::ProcessHandle GetHandle() const = 0;
138 141
142 // Returns whether the process is ready. The process is ready once both
143 // conditions (which can happen in arbitrary order) are true:
144 // 1- the launcher reported a succesful launch
145 // 2- the channel is connected.
146 //
147 // After that point, GetHandle() is valid, and deferred messages have been
148 // sent.
149 virtual bool IsReady() const = 0;
150
139 // Returns the user browser context associated with this renderer process. 151 // Returns the user browser context associated with this renderer process.
140 virtual content::BrowserContext* GetBrowserContext() const = 0; 152 virtual content::BrowserContext* GetBrowserContext() const = 0;
141 153
142 // Returns whether this process is using the same StoragePartition as 154 // Returns whether this process is using the same StoragePartition as
143 // |partition|. 155 // |partition|.
144 virtual bool InSameStoragePartition(StoragePartition* partition) const = 0; 156 virtual bool InSameStoragePartition(StoragePartition* partition) const = 0;
145 157
146 // Returns the unique ID for this child process host. This can be used later 158 // Returns the unique ID for this child process host. This can be used later
147 // in a call to FromID() to get back to this object (this is used to avoid 159 // in a call to FromID() to get back to this object (this is used to avoid
148 // sending non-threadsafe pointers to other threads). 160 // sending non-threadsafe pointers to other threads).
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 static void SetMaxRendererProcessCount(size_t count); 345 static void SetMaxRendererProcessCount(size_t count);
334 346
335 // Returns the current maximum number of renderer process hosts kept by the 347 // Returns the current maximum number of renderer process hosts kept by the
336 // content module. 348 // content module.
337 static size_t GetMaxRendererProcessCount(); 349 static size_t GetMaxRendererProcessCount();
338 }; 350 };
339 351
340 } // namespace content. 352 } // namespace content.
341 353
342 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 354 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW
« 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