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

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

Issue 2342523002: Forcibly clear worker ref counts on shutdown. (Closed)
Patch Set: rebase Created 4 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 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // Returns true if this process currently has backgrounded priority. 297 // Returns true if this process currently has backgrounded priority.
298 virtual bool IsProcessBackgrounded() const = 0; 298 virtual bool IsProcessBackgrounded() const = 0;
299 299
300 // Called when the existence of the other renderer process which is connected 300 // Called when the existence of the other renderer process which is connected
301 // to the Worker in this renderer process has changed. 301 // to the Worker in this renderer process has changed.
302 virtual void IncrementServiceWorkerRefCount() = 0; 302 virtual void IncrementServiceWorkerRefCount() = 0;
303 virtual void DecrementServiceWorkerRefCount() = 0; 303 virtual void DecrementServiceWorkerRefCount() = 0;
304 virtual void IncrementSharedWorkerRefCount() = 0; 304 virtual void IncrementSharedWorkerRefCount() = 0;
305 virtual void DecrementSharedWorkerRefCount() = 0; 305 virtual void DecrementSharedWorkerRefCount() = 0;
306 306
307 // Sets worker ref counts to zero. Called when the browser context will be
308 // destroyed so this RenderProcessHost can immediately die.
309 //
310 // After this is called, the Increment/DecrementWorkerRefCount functions must
311 // not be called.
312 virtual void ForceReleaseWorkerRefCounts() = 0;
313
314 // Returns true if ForceReleaseWorkerRefCounts was called.
315 virtual bool IsWorkerRefCountDisabled() = 0;
316
307 // Purges and suspends the renderer process. 317 // Purges and suspends the renderer process.
308 virtual void PurgeAndSuspend() = 0; 318 virtual void PurgeAndSuspend() = 0;
309 319
310 // Returns the current number of active views in this process. Excludes 320 // Returns the current number of active views in this process. Excludes
311 // any RenderViewHosts that are swapped out. 321 // any RenderViewHosts that are swapped out.
312 size_t GetActiveViewCount(); 322 size_t GetActiveViewCount();
313 323
314 // Static management functions ----------------------------------------------- 324 // Static management functions -----------------------------------------------
315 325
316 // Flag to run the renderer in process. This is primarily 326 // Flag to run the renderer in process. This is primarily
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 static void SetMaxRendererProcessCount(size_t count); 372 static void SetMaxRendererProcessCount(size_t count);
363 373
364 // Returns the current maximum number of renderer process hosts kept by the 374 // Returns the current maximum number of renderer process hosts kept by the
365 // content module. 375 // content module.
366 static size_t GetMaxRendererProcessCount(); 376 static size_t GetMaxRendererProcessCount();
367 }; 377 };
368 378
369 } // namespace content. 379 } // namespace content.
370 380
371 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 381 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/shared_worker/shared_worker_service_impl.cc ('k') | content/public/test/mock_render_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698