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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2633253002: Split content script injections into multiple tasks (Closed)
Patch Set: comments addressed Created 3 years, 9 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 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 1397
1398 void ChromeContentRendererClient::RunScriptsAtDocumentEnd( 1398 void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
1399 content::RenderFrame* render_frame) { 1399 content::RenderFrame* render_frame) {
1400 #if BUILDFLAG(ENABLE_EXTENSIONS) 1400 #if BUILDFLAG(ENABLE_EXTENSIONS)
1401 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd( 1401 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
1402 render_frame); 1402 render_frame);
1403 // |render_frame| might be dead by now. 1403 // |render_frame| might be dead by now.
1404 #endif 1404 #endif
1405 } 1405 }
1406 1406
1407 void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
1408 content::RenderFrame* render_frame) {
1409 #if BUILDFLAG(ENABLE_EXTENSIONS)
1410 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
1411 render_frame);
1412 // |render_frame| might be dead by now.
1413 #endif
1414 }
1415
1407 void ChromeContentRendererClient:: 1416 void ChromeContentRendererClient::
1408 DidInitializeServiceWorkerContextOnWorkerThread( 1417 DidInitializeServiceWorkerContextOnWorkerThread(
1409 v8::Local<v8::Context> context, 1418 v8::Local<v8::Context> context,
1410 int64_t service_worker_version_id, 1419 int64_t service_worker_version_id,
1411 const GURL& url) { 1420 const GURL& url) {
1412 #if BUILDFLAG(ENABLE_EXTENSIONS) 1421 #if BUILDFLAG(ENABLE_EXTENSIONS)
1413 ChromeExtensionsRendererClient::GetInstance() 1422 ChromeExtensionsRendererClient::GetInstance()
1414 ->extension_dispatcher() 1423 ->extension_dispatcher()
1415 ->DidInitializeServiceWorkerContextOnWorkerThread( 1424 ->DidInitializeServiceWorkerContextOnWorkerThread(
1416 context, service_worker_version_id, url); 1425 context, service_worker_version_id, url);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 std::vector<base::SchedulerWorkerPoolParams>* params_vector, 1516 std::vector<base::SchedulerWorkerPoolParams>* params_vector,
1508 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* 1517 base::TaskScheduler::WorkerPoolIndexForTraitsCallback*
1509 index_to_traits_callback) { 1518 index_to_traits_callback) {
1510 DCHECK(params_vector); 1519 DCHECK(params_vector);
1511 DCHECK(index_to_traits_callback); 1520 DCHECK(index_to_traits_callback);
1512 // If this call fails, content will fall back to the default params. 1521 // If this call fails, content will fall back to the default params.
1513 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); 1522 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams();
1514 *index_to_traits_callback = 1523 *index_to_traits_callback =
1515 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); 1524 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits);
1516 } 1525 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | chrome/renderer/extensions/chrome_extensions_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698