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

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

Issue 2929113002: Enable spare RenderProcessHost to be preinitialized. (Closed)
Patch Set: Omnibox hook Created 3 years, 6 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 // Posts |task|, if this RenderProcessHost is ready or when it becomes ready 371 // Posts |task|, if this RenderProcessHost is ready or when it becomes ready
372 // (see RenderProcessHost::IsReady method). The |task| might not run at all 372 // (see RenderProcessHost::IsReady method). The |task| might not run at all
373 // (e.g. if |render_process_host| is destroyed before becoming ready). This 373 // (e.g. if |render_process_host| is destroyed before becoming ready). This
374 // function can only be called on the browser's UI thread (and the |task| will 374 // function can only be called on the browser's UI thread (and the |task| will
375 // be posted back on the UI thread). 375 // be posted back on the UI thread).
376 void PostTaskWhenProcessIsReady(base::OnceClosure task); 376 void PostTaskWhenProcessIsReady(base::OnceClosure task);
377 377
378 // Static management functions ----------------------------------------------- 378 // Static management functions -----------------------------------------------
379 379
380 // Possibly start an unbound, spare RenderProcessHost. A subsequent call to
381 // CreateRenderProcessHost with a matching browser_context may use this
382 // preinitialized RenderProcessHost, improving performance.
Charlie Reis 2017/06/25 23:48:28 Please elaborate (as mentioned in the comment in r
mattcary 2017/06/26 14:45:07 Done.
383 static void WarmupSpareRenderProcessHost(
384 content::BrowserContext* browser_context);
385
380 // Flag to run the renderer in process. This is primarily 386 // Flag to run the renderer in process. This is primarily
381 // for debugging purposes. When running "in process", the 387 // for debugging purposes. When running "in process", the
382 // browser maintains a single RenderProcessHost which communicates 388 // browser maintains a single RenderProcessHost which communicates
383 // to a RenderProcess which is instantiated in the same process 389 // to a RenderProcess which is instantiated in the same process
384 // with the Browser. All IPC between the Browser and the 390 // with the Browser. All IPC between the Browser and the
385 // Renderer is the same, it's just not crossing a process boundary. 391 // Renderer is the same, it's just not crossing a process boundary.
386 392
387 static bool run_renderer_in_process(); 393 static bool run_renderer_in_process();
388 394
389 // This also calls out to ContentBrowserClient::GetApplicationLocale and 395 // This also calls out to ContentBrowserClient::GetApplicationLocale and
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 static void SetMaxRendererProcessCount(size_t count); 432 static void SetMaxRendererProcessCount(size_t count);
427 433
428 // Returns the current maximum number of renderer process hosts kept by the 434 // Returns the current maximum number of renderer process hosts kept by the
429 // content module. 435 // content module.
430 static size_t GetMaxRendererProcessCount(); 436 static size_t GetMaxRendererProcessCount();
431 }; 437 };
432 438
433 } // namespace content. 439 } // namespace content.
434 440
435 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ 441 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698