| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 | 1393 |
| 1394 void ChromeContentRendererClient::RunScriptsAtDocumentEnd( | 1394 void ChromeContentRendererClient::RunScriptsAtDocumentEnd( |
| 1395 content::RenderFrame* render_frame) { | 1395 content::RenderFrame* render_frame) { |
| 1396 #if defined(ENABLE_EXTENSIONS) | 1396 #if defined(ENABLE_EXTENSIONS) |
| 1397 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd( | 1397 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd( |
| 1398 render_frame); | 1398 render_frame); |
| 1399 // |render_frame| might be dead by now. | 1399 // |render_frame| might be dead by now. |
| 1400 #endif | 1400 #endif |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 void | 1403 void ChromeContentRendererClient:: |
| 1404 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( | 1404 DidInitializeServiceWorkerContextOnWorkerThread( |
| 1405 v8::Local<v8::Context> context, | 1405 v8::Local<v8::Context> context, |
| 1406 const GURL& url) { | 1406 int embedded_worker_id, |
| 1407 const GURL& url) { |
| 1407 #if defined(ENABLE_EXTENSIONS) | 1408 #if defined(ENABLE_EXTENSIONS) |
| 1408 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( | 1409 ChromeExtensionsRendererClient::GetInstance() |
| 1409 context, url); | 1410 ->extension_dispatcher() |
| 1411 ->DidInitializeServiceWorkerContextOnWorkerThread( |
| 1412 context, embedded_worker_id, url); |
| 1410 #endif | 1413 #endif |
| 1411 } | 1414 } |
| 1412 | 1415 |
| 1413 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( | 1416 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( |
| 1414 v8::Local<v8::Context> context, | 1417 v8::Local<v8::Context> context, |
| 1418 int embedded_worker_id, |
| 1415 const GURL& url) { | 1419 const GURL& url) { |
| 1416 #if defined(ENABLE_EXTENSIONS) | 1420 #if defined(ENABLE_EXTENSIONS) |
| 1417 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(context, | 1421 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread( |
| 1418 url); | 1422 context, embedded_worker_id, url); |
| 1419 #endif | 1423 #endif |
| 1420 } | 1424 } |
| 1421 | 1425 |
| 1422 // If we're in an extension, there is no need disabling multiple routes as | 1426 // If we're in an extension, there is no need disabling multiple routes as |
| 1423 // chrome.system.network.getNetworkInterfaces provides the same | 1427 // chrome.system.network.getNetworkInterfaces provides the same |
| 1424 // information. Also, the enforcement of sending and binding UDP is already done | 1428 // information. Also, the enforcement of sending and binding UDP is already done |
| 1425 // by chrome extension permission model. | 1429 // by chrome extension permission model. |
| 1426 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1430 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
| 1427 #if defined(ENABLE_EXTENSIONS) | 1431 #if defined(ENABLE_EXTENSIONS) |
| 1428 return !IsStandaloneExtensionProcess(); | 1432 return !IsStandaloneExtensionProcess(); |
| 1429 #else | 1433 #else |
| 1430 return true; | 1434 return true; |
| 1431 #endif | 1435 #endif |
| 1432 } | 1436 } |
| OLD | NEW |