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

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

Issue 2569963002: MemoryCoordinator checks if ServiceWorker exists on the suspending process (Closed)
Patch Set: Updated several comments Created 4 years 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 typedef std::list<scoped_refptr<media::AudioOutputController>> 297 typedef std::list<scoped_refptr<media::AudioOutputController>>
298 AudioOutputControllerList; 298 AudioOutputControllerList;
299 typedef base::Callback<void(const AudioOutputControllerList&)> 299 typedef base::Callback<void(const AudioOutputControllerList&)>
300 GetAudioOutputControllersCallback; 300 GetAudioOutputControllersCallback;
301 virtual void GetAudioOutputControllers( 301 virtual void GetAudioOutputControllers(
302 const GetAudioOutputControllersCallback& callback) const = 0; 302 const GetAudioOutputControllersCallback& callback) const = 0;
303 303
304 // Returns true if this process currently has backgrounded priority. 304 // Returns true if this process currently has backgrounded priority.
305 virtual bool IsProcessBackgrounded() const = 0; 305 virtual bool IsProcessBackgrounded() const = 0;
306 306
307 // Returns the total number of shared worker and service workers.
falken 2016/12/14 08:21:15 nit: This isn't really the total number of workers
shimazu 2016/12/14 09:34:04 Thanks, updated.
308 virtual size_t GetWorkerRefCount() const = 0;
309
310 // Counts the number of service workers who live on this process. The service
311 // worker ref count is incremented when the worker is trying to look for or
312 // allocate a process, and decremented when worker's shutdown sequence is
313 // completed.
314 virtual void IncrementServiceWorkerRefCount() = 0;
315 virtual void DecrementServiceWorkerRefCount() = 0;
316
307 // Called when the existence of the other renderer process which is connected 317 // Called when the existence of the other renderer process which is connected
308 // to the Worker in this renderer process has changed. 318 // to the Worker in this renderer process has changed.
309 virtual void IncrementServiceWorkerRefCount() = 0; 319
310 virtual void DecrementServiceWorkerRefCount() = 0; 320 // The shared worker ref count is nonzero if any other process is connected to
321 // a shared worker in this process, or a new shared worker is being created in
322 // this process. IncrementSharedWorkerRefCount is called in two cases:
323 // - there was no external renderer connected to a shared worker in this
324 // process, and now there is at least one
325 // - a new worker is being created in this process.
326 // DecrementSharedWorkerRefCount is called in two cases:
327 // - there was an external renderer connected to a shared worker in this
328 // process, and now there is none
329 // - a new worker finished being created in this process
311 virtual void IncrementSharedWorkerRefCount() = 0; 330 virtual void IncrementSharedWorkerRefCount() = 0;
312 virtual void DecrementSharedWorkerRefCount() = 0; 331 virtual void DecrementSharedWorkerRefCount() = 0;
313 332
314 // Sets worker ref counts to zero. Called when the browser context will be 333 // Sets worker ref counts to zero. Called when the browser context will be
315 // destroyed so this RenderProcessHost can immediately die. 334 // destroyed so this RenderProcessHost can immediately die.
316 // 335 //
317 // After this is called, the Increment/DecrementWorkerRefCount functions must 336 // After this is called, the Increment/DecrementWorkerRefCount functions must
318 // not be called. 337 // not be called.
319 virtual void ForceReleaseWorkerRefCounts() = 0; 338 virtual void ForceReleaseWorkerRefCounts() = 0;
320 339
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 static void SetMaxRendererProcessCount(size_t count); 406 static void SetMaxRendererProcessCount(size_t count);
388 407
389 // Returns the current maximum number of renderer process hosts kept by the 408 // Returns the current maximum number of renderer process hosts kept by the
390 // content module. 409 // content module.
391 static size_t GetMaxRendererProcessCount(); 410 static size_t GetMaxRendererProcessCount();
392 }; 411 };
393 412
394 } // namespace content. 413 } // namespace content.
395 414
396 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 415 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698