OLD | NEW |
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 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle( | 1497 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle( |
1498 render_frame); | 1498 render_frame); |
1499 // |render_frame| might be dead by now. | 1499 // |render_frame| might be dead by now. |
1500 #endif | 1500 #endif |
1501 } | 1501 } |
1502 | 1502 |
1503 void ChromeContentRendererClient:: | 1503 void ChromeContentRendererClient:: |
1504 DidInitializeServiceWorkerContextOnWorkerThread( | 1504 DidInitializeServiceWorkerContextOnWorkerThread( |
1505 v8::Local<v8::Context> context, | 1505 v8::Local<v8::Context> context, |
1506 int64_t service_worker_version_id, | 1506 int64_t service_worker_version_id, |
1507 const GURL& url) { | 1507 const GURL& service_worker_scope, |
| 1508 const GURL& script_url) { |
1508 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1509 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1509 ChromeExtensionsRendererClient::GetInstance() | 1510 ChromeExtensionsRendererClient::GetInstance() |
1510 ->extension_dispatcher() | 1511 ->extension_dispatcher() |
1511 ->DidInitializeServiceWorkerContextOnWorkerThread( | 1512 ->DidInitializeServiceWorkerContextOnWorkerThread( |
1512 context, service_worker_version_id, url); | 1513 context, service_worker_version_id, service_worker_scope, script_url); |
1513 #endif | 1514 #endif |
1514 } | 1515 } |
1515 | 1516 |
1516 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( | 1517 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( |
1517 v8::Local<v8::Context> context, | 1518 v8::Local<v8::Context> context, |
1518 int64_t service_worker_version_id, | 1519 int64_t service_worker_version_id, |
1519 const GURL& url) { | 1520 const GURL& service_worker_scope, |
| 1521 const GURL& script_url) { |
1520 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1522 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1521 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread( | 1523 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread( |
1522 context, service_worker_version_id, url); | 1524 context, service_worker_version_id, service_worker_scope, script_url); |
1523 #endif | 1525 #endif |
1524 } | 1526 } |
1525 | 1527 |
1526 // If we're in an extension, there is no need disabling multiple routes as | 1528 // If we're in an extension, there is no need disabling multiple routes as |
1527 // chrome.system.network.getNetworkInterfaces provides the same | 1529 // chrome.system.network.getNetworkInterfaces provides the same |
1528 // information. Also, the enforcement of sending and binding UDP is already done | 1530 // information. Also, the enforcement of sending and binding UDP is already done |
1529 // by chrome extension permission model. | 1531 // by chrome extension permission model. |
1530 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1532 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1531 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1533 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1532 return !IsStandaloneExtensionProcess(); | 1534 return !IsStandaloneExtensionProcess(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 if (safe_browsing_) | 1611 if (safe_browsing_) |
1610 return true; | 1612 return true; |
1611 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 1613 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
1612 switches::kEnableNetworkService)) { | 1614 switches::kEnableNetworkService)) { |
1613 return false; | 1615 return false; |
1614 } | 1616 } |
1615 RenderThread::Get()->GetConnector()->BindInterface( | 1617 RenderThread::Get()->GetConnector()->BindInterface( |
1616 content::mojom::kBrowserServiceName, &safe_browsing_); | 1618 content::mojom::kBrowserServiceName, &safe_browsing_); |
1617 return true; | 1619 return true; |
1618 } | 1620 } |
OLD | NEW |