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

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

Issue 2943583002: [extension SW] Support lazy events from extension service workers. (Closed)
Patch Set: 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 #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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle( 1493 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
1494 render_frame); 1494 render_frame);
1495 // |render_frame| might be dead by now. 1495 // |render_frame| might be dead by now.
1496 #endif 1496 #endif
1497 } 1497 }
1498 1498
1499 void ChromeContentRendererClient:: 1499 void ChromeContentRendererClient::
1500 DidInitializeServiceWorkerContextOnWorkerThread( 1500 DidInitializeServiceWorkerContextOnWorkerThread(
1501 v8::Local<v8::Context> context, 1501 v8::Local<v8::Context> context,
1502 int64_t service_worker_version_id, 1502 int64_t service_worker_version_id,
1503 const GURL& url) { 1503 const GURL& service_worker_scope,
1504 const GURL& script_url) {
1504 #if BUILDFLAG(ENABLE_EXTENSIONS) 1505 #if BUILDFLAG(ENABLE_EXTENSIONS)
1505 ChromeExtensionsRendererClient::GetInstance() 1506 ChromeExtensionsRendererClient::GetInstance()
1506 ->extension_dispatcher() 1507 ->extension_dispatcher()
1507 ->DidInitializeServiceWorkerContextOnWorkerThread( 1508 ->DidInitializeServiceWorkerContextOnWorkerThread(
1508 context, service_worker_version_id, url); 1509 context, service_worker_version_id, service_worker_scope, script_url);
1509 #endif 1510 #endif
1510 } 1511 }
1511 1512
1512 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( 1513 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread(
1513 v8::Local<v8::Context> context, 1514 v8::Local<v8::Context> context,
1514 int64_t service_worker_version_id, 1515 int64_t service_worker_version_id,
1515 const GURL& url) { 1516 const GURL& service_worker_scope,
1517 const GURL& script_url) {
1516 #if BUILDFLAG(ENABLE_EXTENSIONS) 1518 #if BUILDFLAG(ENABLE_EXTENSIONS)
1517 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread( 1519 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(
1518 context, service_worker_version_id, url); 1520 context, service_worker_version_id, service_worker_scope, script_url);
1519 #endif 1521 #endif
1520 } 1522 }
1521 1523
1522 // If we're in an extension, there is no need disabling multiple routes as 1524 // If we're in an extension, there is no need disabling multiple routes as
1523 // chrome.system.network.getNetworkInterfaces provides the same 1525 // chrome.system.network.getNetworkInterfaces provides the same
1524 // information. Also, the enforcement of sending and binding UDP is already done 1526 // information. Also, the enforcement of sending and binding UDP is already done
1525 // by chrome extension permission model. 1527 // by chrome extension permission model.
1526 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1528 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1527 #if BUILDFLAG(ENABLE_EXTENSIONS) 1529 #if BUILDFLAG(ENABLE_EXTENSIONS)
1528 return !IsStandaloneExtensionProcess(); 1530 return !IsStandaloneExtensionProcess();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 1595
1594 RecordYouTubeRewriteUMA(result); 1596 RecordYouTubeRewriteUMA(result);
1595 return corrected_url.ReplaceComponents(r); 1597 return corrected_url.ReplaceComponents(r);
1596 } 1598 }
1597 1599
1598 std::unique_ptr<base::TaskScheduler::InitParams> 1600 std::unique_ptr<base::TaskScheduler::InitParams>
1599 ChromeContentRendererClient::GetTaskSchedulerInitParams() { 1601 ChromeContentRendererClient::GetTaskSchedulerInitParams() {
1600 return task_scheduler_util:: 1602 return task_scheduler_util::
1601 GetRendererTaskSchedulerInitParamsFromCommandLine(); 1603 GetRendererTaskSchedulerInitParamsFromCommandLine();
1602 } 1604 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698