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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 data_reduction_proxy::chrome_proxy_header())); | 1385 data_reduction_proxy::chrome_proxy_header())); |
1386 if (!response.httpHeaderField(header_key).isNull() && | 1386 if (!response.httpHeaderField(header_key).isNull() && |
1387 response.httpHeaderField(header_key).utf8().find( | 1387 response.httpHeaderField(header_key).utf8().find( |
1388 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != | 1388 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != |
1389 std::string::npos) { | 1389 std::string::npos) { |
1390 (*properties)[data_reduction_proxy::chrome_proxy_header()] = | 1390 (*properties)[data_reduction_proxy::chrome_proxy_header()] = |
1391 data_reduction_proxy::chrome_proxy_lo_fi_directive(); | 1391 data_reduction_proxy::chrome_proxy_lo_fi_directive(); |
1392 } | 1392 } |
1393 } | 1393 } |
1394 | 1394 |
| 1395 void ChromeContentRendererClient::RunScriptsAtDocumentStart( |
| 1396 content::RenderFrame* render_frame) { |
| 1397 #if defined(ENABLE_EXTENSIONS) |
| 1398 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentStart( |
| 1399 render_frame); |
| 1400 // |render_frame| might be dead by now. |
| 1401 #endif |
| 1402 } |
| 1403 |
| 1404 void ChromeContentRendererClient::RunScriptsAtDocumentEnd( |
| 1405 content::RenderFrame* render_frame) { |
| 1406 #if defined(ENABLE_EXTENSIONS) |
| 1407 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd( |
| 1408 render_frame); |
| 1409 // |render_frame| might be dead by now. |
| 1410 #endif |
| 1411 } |
| 1412 |
1395 void | 1413 void |
1396 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( | 1414 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( |
1397 v8::Local<v8::Context> context, | 1415 v8::Local<v8::Context> context, |
1398 const GURL& url) { | 1416 const GURL& url) { |
1399 #if defined(ENABLE_EXTENSIONS) | 1417 #if defined(ENABLE_EXTENSIONS) |
1400 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( | 1418 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( |
1401 context, url); | 1419 context, url); |
1402 #endif | 1420 #endif |
1403 } | 1421 } |
1404 | 1422 |
(...skipping 10 matching lines...) Expand all Loading... |
1415 // chrome.system.network.getNetworkInterfaces provides the same | 1433 // chrome.system.network.getNetworkInterfaces provides the same |
1416 // information. Also, the enforcement of sending and binding UDP is already done | 1434 // information. Also, the enforcement of sending and binding UDP is already done |
1417 // by chrome extension permission model. | 1435 // by chrome extension permission model. |
1418 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1436 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1419 #if defined(ENABLE_EXTENSIONS) | 1437 #if defined(ENABLE_EXTENSIONS) |
1420 return !IsStandaloneExtensionProcess(); | 1438 return !IsStandaloneExtensionProcess(); |
1421 #else | 1439 #else |
1422 return true; | 1440 return true; |
1423 #endif | 1441 #endif |
1424 } | 1442 } |
OLD | NEW |