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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 327363002: Remove adview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/chrome_extensions_dispatcher_delegate.h" 5 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 source_map->RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS); 242 source_map->RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS);
243 source_map->RegisterSource("webview", IDR_WEBVIEW_CUSTOM_BINDINGS_JS); 243 source_map->RegisterSource("webview", IDR_WEBVIEW_CUSTOM_BINDINGS_JS);
244 // Note: webView not webview so that this doesn't interfere with the 244 // Note: webView not webview so that this doesn't interfere with the
245 // chrome.webview API bindings. 245 // chrome.webview API bindings.
246 source_map->RegisterSource("webView", IDR_WEB_VIEW_JS); 246 source_map->RegisterSource("webView", IDR_WEB_VIEW_JS);
247 source_map->RegisterSource("webViewExperimental", 247 source_map->RegisterSource("webViewExperimental",
248 IDR_WEB_VIEW_EXPERIMENTAL_JS); 248 IDR_WEB_VIEW_EXPERIMENTAL_JS);
249 source_map->RegisterSource("webViewRequest", 249 source_map->RegisterSource("webViewRequest",
250 IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS); 250 IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS);
251 source_map->RegisterSource("denyWebView", IDR_WEB_VIEW_DENY_JS); 251 source_map->RegisterSource("denyWebView", IDR_WEB_VIEW_DENY_JS);
252 source_map->RegisterSource("adView", IDR_AD_VIEW_JS);
253 source_map->RegisterSource("denyAdView", IDR_AD_VIEW_DENY_JS);
254 source_map->RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS); 252 source_map->RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS);
255 } 253 }
256 254
257 void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules( 255 void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules(
258 extensions::ModuleSystem* module_system, 256 extensions::ModuleSystem* module_system,
259 const extensions::Extension* extension, 257 const extensions::Extension* extension,
260 extensions::Feature::Context context_type, 258 extensions::Feature::Context context_type,
261 bool is_within_platform_app) { 259 bool is_within_platform_app) {
262 if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT && 260 if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT &&
263 is_within_platform_app && 261 is_within_platform_app &&
(...skipping 28 matching lines...) Expand all
292 hexencoded_id_hash == "1A26E32DE447A17CBE5E9750CDBA78F58539B39C" || 290 hexencoded_id_hash == "1A26E32DE447A17CBE5E9750CDBA78F58539B39C" ||
293 hexencoded_id_hash == "59048028102D7B4C681DBC7BC6CD980C3DC66DA3") { 291 hexencoded_id_hash == "59048028102D7B4C681DBC7BC6CD980C3DC66DA3") {
294 module_system->Require("webViewExperimental"); 292 module_system->Require("webViewExperimental");
295 } 293 }
296 } 294 }
297 } else { 295 } else {
298 module_system->Require("denyWebView"); 296 module_system->Require("denyWebView");
299 } 297 }
300 } 298 }
301 299
302 // Same comment as above for <adview> tag. 300 // Same comment as above for <adview> tag.
lazyboy 2014/06/11 22:34:00 Remove this too.
Fady Samuel 2014/06/12 20:53:31 Done.
303 if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT && 301 if (context_type == extensions::Feature::BLESSED_EXTENSION_CONTEXT &&
304 is_within_platform_app) { 302 is_within_platform_app) {
305 if (CommandLine::ForCurrentProcess()->HasSwitch( 303 if (CommandLine::ForCurrentProcess()->HasSwitch(
306 ::switches::kEnableAdview)) { 304 ::switches::kEnableAdview)) {
lazyboy 2014/06/11 22:33:59 Remove the switch.
Fady Samuel 2014/06/12 20:53:30 Done.
307 if (extension->permissions_data()->HasAPIPermission( 305 if (extension->permissions_data()->HasAPIPermission(
308 extensions::APIPermission::kAdView)) { 306 extensions::APIPermission::kAdView)) {
lazyboy 2014/06/11 22:34:00 Remove adview from permission enum.
Fady Samuel 2014/06/12 20:53:31 Done.
309 module_system->Require("adView"); 307 module_system->Require("adView");
310 } else { 308 } else {
311 module_system->Require("denyAdView"); 309 module_system->Require("denyAdView");
312 } 310 }
313 } 311 }
314 } 312 }
315 } 313 }
316 314
317 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated( 315 void ChromeExtensionsDispatcherDelegate::OnActiveExtensionsUpdated(
318 const std::set<std::string>& extension_ids) { 316 const std::set<std::string>& extension_ids) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 368 }
371 369
372 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage( 370 void ChromeExtensionsDispatcherDelegate::HandleWebRequestAPIUsage(
373 bool adblock, 371 bool adblock,
374 bool adblock_plus, 372 bool adblock_plus,
375 bool other) { 373 bool other) {
376 webrequest_adblock_ = adblock; 374 webrequest_adblock_ = adblock;
377 webrequest_adblock_plus_ = adblock_plus; 375 webrequest_adblock_plus_ = adblock_plus;
378 webrequest_other_ = other; 376 webrequest_other_ = other;
379 } 377 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698