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

Side by Side Diff: content/public/browser/render_process_host.h

Issue 1369603003: Remove 2-stage RenderWidget initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_offscreen_contexts
Patch Set: rebase 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
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.
ncarter (slow) 2015/09/29 18:28:40 Is there a DCHECK that catches this case? (If not,
piman 2015/09/29 23:54:27 There's not, and I considered it, but I did not ad
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 it is
143 // launched and the channel is connected. At that point, GetHandle() is valid,
ncarter (slow) 2015/09/29 18:28:40 I'm on the fence here, as to whether it's better t
piman 2015/09/29 23:54:27 Ok, I clarified a bit in the latest PS.
144 // and deferred messages have been sent.
145 virtual bool IsReady() const = 0;
146
139 // Returns the user browser context associated with this renderer process. 147 // Returns the user browser context associated with this renderer process.
140 virtual content::BrowserContext* GetBrowserContext() const = 0; 148 virtual content::BrowserContext* GetBrowserContext() const = 0;
141 149
142 // Returns whether this process is using the same StoragePartition as 150 // Returns whether this process is using the same StoragePartition as
143 // |partition|. 151 // |partition|.
144 virtual bool InSameStoragePartition(StoragePartition* partition) const = 0; 152 virtual bool InSameStoragePartition(StoragePartition* partition) const = 0;
145 153
146 // Returns the unique ID for this child process host. This can be used later 154 // 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 155 // in a call to FromID() to get back to this object (this is used to avoid
148 // sending non-threadsafe pointers to other threads). 156 // 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); 341 static void SetMaxRendererProcessCount(size_t count);
334 342
335 // Returns the current maximum number of renderer process hosts kept by the 343 // Returns the current maximum number of renderer process hosts kept by the
336 // content module. 344 // content module.
337 static size_t GetMaxRendererProcessCount(); 345 static size_t GetMaxRendererProcessCount();
338 }; 346 };
339 347
340 } // namespace content. 348 } // namespace content.
341 349
342 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 350 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698