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 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 data_reduction_proxy::chrome_proxy_header())); | 1379 data_reduction_proxy::chrome_proxy_header())); |
1380 if (!response.httpHeaderField(header_key).isNull() && | 1380 if (!response.httpHeaderField(header_key).isNull() && |
1381 response.httpHeaderField(header_key).utf8().find( | 1381 response.httpHeaderField(header_key).utf8().find( |
1382 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != | 1382 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != |
1383 std::string::npos) { | 1383 std::string::npos) { |
1384 (*properties)[data_reduction_proxy::chrome_proxy_header()] = | 1384 (*properties)[data_reduction_proxy::chrome_proxy_header()] = |
1385 data_reduction_proxy::chrome_proxy_lo_fi_directive(); | 1385 data_reduction_proxy::chrome_proxy_lo_fi_directive(); |
1386 } | 1386 } |
1387 } | 1387 } |
1388 | 1388 |
| 1389 void ChromeContentRendererClient::AfterDidCreateDocumentElement( |
| 1390 content::RenderFrame* render_frame) { |
| 1391 #if defined(ENABLE_EXTENSIONS) |
| 1392 ChromeExtensionsRendererClient::GetInstance()->AfterDidCreateDocumentElement( |
| 1393 render_frame); |
| 1394 // |render_frame| might be dead by now. |
| 1395 #endif |
| 1396 } |
| 1397 |
| 1398 void ChromeContentRendererClient::AfterDidFinishDocumentLoad( |
| 1399 content::RenderFrame* render_frame) { |
| 1400 #if defined(ENABLE_EXTENSIONS) |
| 1401 ChromeExtensionsRendererClient::GetInstance()->AfterDidFinishDocumentLoad( |
| 1402 render_frame); |
| 1403 // |render_frame| might be dead by now. |
| 1404 #endif |
| 1405 } |
| 1406 |
1389 void | 1407 void |
1390 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( | 1408 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( |
1391 v8::Local<v8::Context> context, | 1409 v8::Local<v8::Context> context, |
1392 const GURL& url) { | 1410 const GURL& url) { |
1393 #if defined(ENABLE_EXTENSIONS) | 1411 #if defined(ENABLE_EXTENSIONS) |
1394 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( | 1412 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( |
1395 context, url); | 1413 context, url); |
1396 #endif | 1414 #endif |
1397 } | 1415 } |
1398 | 1416 |
(...skipping 10 matching lines...) Expand all Loading... |
1409 // chrome.system.network.getNetworkInterfaces provides the same | 1427 // chrome.system.network.getNetworkInterfaces provides the same |
1410 // 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 |
1411 // by chrome extension permission model. | 1429 // by chrome extension permission model. |
1412 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1430 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1413 #if defined(ENABLE_EXTENSIONS) | 1431 #if defined(ENABLE_EXTENSIONS) |
1414 return !IsStandaloneExtensionProcess(); | 1432 return !IsStandaloneExtensionProcess(); |
1415 #else | 1433 #else |
1416 return true; | 1434 return true; |
1417 #endif | 1435 #endif |
1418 } | 1436 } |
OLD | NEW |