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

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: Added comments and clarified the auto types 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 sum of the shared worker and service worker ref counts.
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 this process is allocated to the
312 // worker, and decremented when worker's shutdown sequence is completed.
313 virtual void IncrementServiceWorkerRefCount() = 0;
314 virtual void DecrementServiceWorkerRefCount() = 0;
315
307 // Called when the existence of the other renderer process which is connected 316 // Called when the existence of the other renderer process which is connected
308 // to the Worker in this renderer process has changed. 317 // to the Worker in this renderer process has changed.
309 virtual void IncrementServiceWorkerRefCount() = 0; 318
310 virtual void DecrementServiceWorkerRefCount() = 0; 319 // The shared worker ref count is nonzero if any other process is connected to
320 // a shared worker in this process, or a new shared worker is being created in
321 // this process. IncrementSharedWorkerRefCount is called in two cases:
322 // - there was no external renderer connected to a shared worker in this
323 // process, and now there is at least one
324 // - a new worker is being created in this process.
325 // DecrementSharedWorkerRefCount is called in two cases:
326 // - there was an external renderer connected to a shared worker in this
327 // process, and now there is none
328 // - a new worker finished being created in this process
311 virtual void IncrementSharedWorkerRefCount() = 0; 329 virtual void IncrementSharedWorkerRefCount() = 0;
312 virtual void DecrementSharedWorkerRefCount() = 0; 330 virtual void DecrementSharedWorkerRefCount() = 0;
313 331
314 // Sets worker ref counts to zero. Called when the browser context will be 332 // Sets worker ref counts to zero. Called when the browser context will be
315 // destroyed so this RenderProcessHost can immediately die. 333 // destroyed so this RenderProcessHost can immediately die.
316 // 334 //
317 // After this is called, the Increment/DecrementWorkerRefCount functions must 335 // After this is called, the Increment/DecrementWorkerRefCount functions must
318 // not be called. 336 // not be called.
319 virtual void ForceReleaseWorkerRefCounts() = 0; 337 virtual void ForceReleaseWorkerRefCounts() = 0;
320 338
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 static void SetMaxRendererProcessCount(size_t count); 405 static void SetMaxRendererProcessCount(size_t count);
388 406
389 // Returns the current maximum number of renderer process hosts kept by the 407 // Returns the current maximum number of renderer process hosts kept by the
390 // content module. 408 // content module.
391 static size_t GetMaxRendererProcessCount(); 409 static size_t GetMaxRendererProcessCount();
392 }; 410 };
393 411
394 } // namespace content. 412 } // namespace content.
395 413
396 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 414 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698