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

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

Powered by Google App Engine
This is Rietveld 408576698