Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1642283002: Deal with frame removal by content scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Up to #50: ExtensionFrameHelper callbacks, comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698