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

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

Issue 2633253002: Split content script injections into multiple tasks (Closed)
Patch Set: rebase 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 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1400
1401 void ChromeContentRendererClient::RunScriptsAtDocumentEnd( 1401 void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
1402 content::RenderFrame* render_frame) { 1402 content::RenderFrame* render_frame) {
1403 #if BUILDFLAG(ENABLE_EXTENSIONS) 1403 #if BUILDFLAG(ENABLE_EXTENSIONS)
1404 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd( 1404 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
1405 render_frame); 1405 render_frame);
1406 // |render_frame| might be dead by now. 1406 // |render_frame| might be dead by now.
1407 #endif 1407 #endif
1408 } 1408 }
1409 1409
1410 void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
1411 content::RenderFrame* render_frame) {
1412 #if BUILDFLAG(ENABLE_EXTENSIONS)
1413 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
1414 render_frame);
1415 // |render_frame| might be dead by now.
1416 #endif
1417 }
1418
1410 void ChromeContentRendererClient:: 1419 void ChromeContentRendererClient::
1411 DidInitializeServiceWorkerContextOnWorkerThread( 1420 DidInitializeServiceWorkerContextOnWorkerThread(
1412 v8::Local<v8::Context> context, 1421 v8::Local<v8::Context> context,
1413 int64_t service_worker_version_id, 1422 int64_t service_worker_version_id,
1414 const GURL& url) { 1423 const GURL& url) {
1415 #if BUILDFLAG(ENABLE_EXTENSIONS) 1424 #if BUILDFLAG(ENABLE_EXTENSIONS)
1416 ChromeExtensionsRendererClient::GetInstance() 1425 ChromeExtensionsRendererClient::GetInstance()
1417 ->extension_dispatcher() 1426 ->extension_dispatcher()
1418 ->DidInitializeServiceWorkerContextOnWorkerThread( 1427 ->DidInitializeServiceWorkerContextOnWorkerThread(
1419 context, service_worker_version_id, url); 1428 context, service_worker_version_id, url);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 std::vector<base::SchedulerWorkerPoolParams>* params_vector, 1519 std::vector<base::SchedulerWorkerPoolParams>* params_vector,
1511 base::TaskScheduler::WorkerPoolIndexForTraitsCallback* 1520 base::TaskScheduler::WorkerPoolIndexForTraitsCallback*
1512 index_to_traits_callback) { 1521 index_to_traits_callback) {
1513 DCHECK(params_vector); 1522 DCHECK(params_vector);
1514 DCHECK(index_to_traits_callback); 1523 DCHECK(index_to_traits_callback);
1515 // If this call fails, content will fall back to the default params. 1524 // If this call fails, content will fall back to the default params.
1516 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams(); 1525 *params_vector = task_scheduler_util::GetRendererWorkerPoolParams();
1517 *index_to_traits_callback = 1526 *index_to_traits_callback =
1518 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits); 1527 base::Bind(&task_scheduler_util::RendererWorkerPoolIndexForTraits);
1519 } 1528 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698