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