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

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

Issue 8538004: Take script URLs into account when applying script content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 bool ChromeRenderViewObserver::allowPlugins(WebFrame* frame, 416 bool ChromeRenderViewObserver::allowPlugins(WebFrame* frame,
417 bool enabled_per_settings) { 417 bool enabled_per_settings) {
418 return content_settings_->AllowPlugins(frame, enabled_per_settings); 418 return content_settings_->AllowPlugins(frame, enabled_per_settings);
419 } 419 }
420 420
421 bool ChromeRenderViewObserver::allowScript(WebFrame* frame, 421 bool ChromeRenderViewObserver::allowScript(WebFrame* frame,
422 bool enabled_per_settings) { 422 bool enabled_per_settings) {
423 return content_settings_->AllowScript(frame, enabled_per_settings); 423 return content_settings_->AllowScript(frame, enabled_per_settings);
424 } 424 }
425 425
426 bool ChromeRenderViewObserver::allowScriptFromSource(
427 WebFrame* frame,
428 bool enabled_per_settings,
429 const WebURL& script_url) {
430 return content_settings_->AllowScriptFromSource(frame,
431 enabled_per_settings,
432 script_url);
433 }
434
426 bool ChromeRenderViewObserver::allowScriptExtension( 435 bool ChromeRenderViewObserver::allowScriptExtension(
427 WebFrame* frame, const WebString& extension_name, int extension_group) { 436 WebFrame* frame, const WebString& extension_name, int extension_group) {
428 return extension_dispatcher_->AllowScriptExtension( 437 return extension_dispatcher_->AllowScriptExtension(
429 frame, extension_name.utf8(), extension_group); 438 frame, extension_name.utf8(), extension_group);
430 } 439 }
431 440
432 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { 441 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) {
433 return content_settings_->AllowStorage(frame, local); 442 return content_settings_->AllowStorage(frame, local);
434 } 443 }
435 444
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 reinterpret_cast<const unsigned char*>(&data[0]); 1043 reinterpret_cast<const unsigned char*>(&data[0]);
1035 1044
1036 return decoder.Decode(src_data, data.size()); 1045 return decoder.Decode(src_data, data.size());
1037 } 1046 }
1038 return SkBitmap(); 1047 return SkBitmap();
1039 } 1048 }
1040 1049
1041 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { 1050 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) {
1042 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); 1051 return (strict_security_hosts_.find(host) != strict_security_hosts_.end());
1043 } 1052 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.h ('k') | chrome/renderer/content_settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698