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

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

Issue 2857263003: Task Manager should listen to WebContentsObserver::RenderFrameCreated. (Closed)
Patch Set: Make PostTaskWhenProcessIsReady an instance method of RPH. Created 3 years, 7 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 // Whether this process is locked out from ever being reused for sites other 350 // Whether this process is locked out from ever being reused for sites other
351 // than the ones it currently has. 351 // than the ones it currently has.
352 virtual void SetIsNeverSuitableForReuse() = 0; 352 virtual void SetIsNeverSuitableForReuse() = 0;
353 virtual bool MayReuseHost() = 0; 353 virtual bool MayReuseHost() = 0;
354 354
355 // Returns the current number of active views in this process. Excludes 355 // Returns the current number of active views in this process. Excludes
356 // any RenderViewHosts that are swapped out. 356 // any RenderViewHosts that are swapped out.
357 size_t GetActiveViewCount(); 357 size_t GetActiveViewCount();
358 358
359 // Posts |task|, if this RenderProcessHost is ready or when it becomes ready
360 // (see RenderProcessHost::IsReady method). The |task| might not run at all
361 // (e.g. if |render_process_host| is destroyed before becoming ready). This
362 // function can only be called on the browser's UI thread (and the |task| will
363 // be posted back on the UI thread).
364 void PostTaskWhenProcessIsReady(base::OnceClosure task);
ncarter (slow) 2017/05/12 21:56:02 I bet we could implement RenderViewHostImpl::PostR
Łukasz Anforowicz 2017/05/16 16:37:25 Good idea. Done.
365
359 // Static management functions ----------------------------------------------- 366 // Static management functions -----------------------------------------------
360 367
361 // Flag to run the renderer in process. This is primarily 368 // Flag to run the renderer in process. This is primarily
362 // for debugging purposes. When running "in process", the 369 // for debugging purposes. When running "in process", the
363 // browser maintains a single RenderProcessHost which communicates 370 // browser maintains a single RenderProcessHost which communicates
364 // to a RenderProcess which is instantiated in the same process 371 // to a RenderProcess which is instantiated in the same process
365 // with the Browser. All IPC between the Browser and the 372 // with the Browser. All IPC between the Browser and the
366 // Renderer is the same, it's just not crossing a process boundary. 373 // Renderer is the same, it's just not crossing a process boundary.
367 374
368 static bool run_renderer_in_process(); 375 static bool run_renderer_in_process();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 static void SetMaxRendererProcessCount(size_t count); 414 static void SetMaxRendererProcessCount(size_t count);
408 415
409 // Returns the current maximum number of renderer process hosts kept by the 416 // Returns the current maximum number of renderer process hosts kept by the
410 // content module. 417 // content module.
411 static size_t GetMaxRendererProcessCount(); 418 static size_t GetMaxRendererProcessCount();
412 }; 419 };
413 420
414 } // namespace content. 421 } // namespace content.
415 422
416 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 423 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698