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

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

Issue 2420843004: Clean up mojom::Renderer usage in RPH (Closed)
Patch Set: rebase Created 4 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 namespace content { 40 namespace content {
41 class BrowserContext; 41 class BrowserContext;
42 class BrowserMessageFilter; 42 class BrowserMessageFilter;
43 class RenderProcessHostObserver; 43 class RenderProcessHostObserver;
44 class RenderWidgetHost; 44 class RenderWidgetHost;
45 class StoragePartition; 45 class StoragePartition;
46 struct GlobalRequestID; 46 struct GlobalRequestID;
47 47
48 namespace mojom {
49 class Renderer;
50 }
51
48 // Interface that represents the browser side of the browser <-> renderer 52 // Interface that represents the browser side of the browser <-> renderer
49 // communication channel. There will generally be one RenderProcessHost per 53 // communication channel. There will generally be one RenderProcessHost per
50 // renderer process. 54 // renderer process.
51 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, 55 class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
52 public IPC::Listener, 56 public IPC::Listener,
53 public base::SupportsUserData { 57 public base::SupportsUserData {
54 public: 58 public:
55 typedef IDMap<RenderProcessHost>::iterator iterator; 59 typedef IDMap<RenderProcessHost>::iterator iterator;
56 60
57 // Details for RENDERER_PROCESS_CLOSED notifications. 61 // Details for RENDERER_PROCESS_CLOSED notifications.
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // After this is called, the Increment/DecrementWorkerRefCount functions must 313 // After this is called, the Increment/DecrementWorkerRefCount functions must
310 // not be called. 314 // not be called.
311 virtual void ForceReleaseWorkerRefCounts() = 0; 315 virtual void ForceReleaseWorkerRefCounts() = 0;
312 316
313 // Returns true if ForceReleaseWorkerRefCounts was called. 317 // Returns true if ForceReleaseWorkerRefCounts was called.
314 virtual bool IsWorkerRefCountDisabled() = 0; 318 virtual bool IsWorkerRefCountDisabled() = 0;
315 319
316 // Purges and suspends the renderer process. 320 // Purges and suspends the renderer process.
317 virtual void PurgeAndSuspend() = 0; 321 virtual void PurgeAndSuspend() = 0;
318 322
323 // Acquires the |mojom::Renderer| interface to the render process. This is for
324 // internal use only, and is only exposed here to support
325 // MockRenderProcessHost usage in tests.
326 virtual mojom::Renderer* GetRendererInterface() = 0;
327
319 // Returns the current number of active views in this process. Excludes 328 // Returns the current number of active views in this process. Excludes
320 // any RenderViewHosts that are swapped out. 329 // any RenderViewHosts that are swapped out.
321 size_t GetActiveViewCount(); 330 size_t GetActiveViewCount();
322 331
323 // Static management functions ----------------------------------------------- 332 // Static management functions -----------------------------------------------
324 333
325 // Flag to run the renderer in process. This is primarily 334 // Flag to run the renderer in process. This is primarily
326 // for debugging purposes. When running "in process", the 335 // for debugging purposes. When running "in process", the
327 // browser maintains a single RenderProcessHost which communicates 336 // browser maintains a single RenderProcessHost which communicates
328 // to a RenderProcess which is instantiated in the same process 337 // to a RenderProcess which is instantiated in the same process
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 static void SetMaxRendererProcessCount(size_t count); 380 static void SetMaxRendererProcessCount(size_t count);
372 381
373 // Returns the current maximum number of renderer process hosts kept by the 382 // Returns the current maximum number of renderer process hosts kept by the
374 // content module. 383 // content module.
375 static size_t GetMaxRendererProcessCount(); 384 static size_t GetMaxRendererProcessCount();
376 }; 385 };
377 386
378 } // namespace content. 387 } // namespace content.
379 388
380 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 389 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.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