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

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

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 4 years, 7 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 <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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 1350
1351 void ChromeContentRendererClient::RunScriptsAtDocumentEnd( 1351 void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
1352 content::RenderFrame* render_frame) { 1352 content::RenderFrame* render_frame) {
1353 #if defined(ENABLE_EXTENSIONS) 1353 #if defined(ENABLE_EXTENSIONS)
1354 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd( 1354 ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
1355 render_frame); 1355 render_frame);
1356 // |render_frame| might be dead by now. 1356 // |render_frame| might be dead by now.
1357 #endif 1357 #endif
1358 } 1358 }
1359 1359
1360 void 1360 void ChromeContentRendererClient::
1361 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( 1361 DidInitializeServiceWorkerContextOnWorkerThread(
1362 v8::Local<v8::Context> context, 1362 v8::Local<v8::Context> context,
1363 const GURL& url) { 1363 int embedded_worker_id,
1364 const GURL& url) {
1364 #if defined(ENABLE_EXTENSIONS) 1365 #if defined(ENABLE_EXTENSIONS)
1365 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( 1366 ChromeExtensionsRendererClient::GetInstance()
1366 context, url); 1367 ->extension_dispatcher()
1368 ->DidInitializeServiceWorkerContextOnWorkerThread(
1369 context, embedded_worker_id, url);
1367 #endif 1370 #endif
1368 } 1371 }
1369 1372
1370 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread( 1373 void ChromeContentRendererClient::WillDestroyServiceWorkerContextOnWorkerThread(
1371 v8::Local<v8::Context> context, 1374 v8::Local<v8::Context> context,
1375 int embedded_worker_id,
1372 const GURL& url) { 1376 const GURL& url) {
1373 #if defined(ENABLE_EXTENSIONS) 1377 #if defined(ENABLE_EXTENSIONS)
1374 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(context, 1378 extensions::Dispatcher::WillDestroyServiceWorkerContextOnWorkerThread(
1375 url); 1379 context, embedded_worker_id, url);
1376 #endif 1380 #endif
1377 } 1381 }
1378 1382
1379 // If we're in an extension, there is no need disabling multiple routes as 1383 // If we're in an extension, there is no need disabling multiple routes as
1380 // chrome.system.network.getNetworkInterfaces provides the same 1384 // chrome.system.network.getNetworkInterfaces provides the same
1381 // information. Also, the enforcement of sending and binding UDP is already done 1385 // information. Also, the enforcement of sending and binding UDP is already done
1382 // by chrome extension permission model. 1386 // by chrome extension permission model.
1383 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1387 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1384 #if defined(ENABLE_EXTENSIONS) 1388 #if defined(ENABLE_EXTENSIONS)
1385 return !IsStandaloneExtensionProcess(); 1389 return !IsStandaloneExtensionProcess();
1386 #else 1390 #else
1387 return true; 1391 return true;
1388 #endif 1392 #endif
1389 } 1393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698