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

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

Issue 8409006: Take script URLs into account when applying script content settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix. 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 bool ChromeRenderViewObserver::allowPlugins(WebFrame* frame, 409 bool ChromeRenderViewObserver::allowPlugins(WebFrame* frame,
410 bool enabled_per_settings) { 410 bool enabled_per_settings) {
411 return content_settings_->AllowPlugins(frame, enabled_per_settings); 411 return content_settings_->AllowPlugins(frame, enabled_per_settings);
412 } 412 }
413 413
414 bool ChromeRenderViewObserver::allowScript(WebFrame* frame, 414 bool ChromeRenderViewObserver::allowScript(WebFrame* frame,
415 bool enabled_per_settings) { 415 bool enabled_per_settings) {
416 return content_settings_->AllowScript(frame, enabled_per_settings); 416 return content_settings_->AllowScript(frame, enabled_per_settings);
417 } 417 }
418 418
419 bool ChromeRenderViewObserver::allowScriptFromSource(
420 WebFrame* frame,
421 bool enabled_per_settings,
422 const WebURL& script_url) {
423 return content_settings_->AllowScriptFromSource(frame,
424 enabled_per_settings,
425 script_url);
426 }
427
419 bool ChromeRenderViewObserver::allowScriptExtension( 428 bool ChromeRenderViewObserver::allowScriptExtension(
420 WebFrame* frame, const WebString& extension_name, int extension_group) { 429 WebFrame* frame, const WebString& extension_name, int extension_group) {
421 return extension_dispatcher_->AllowScriptExtension( 430 return extension_dispatcher_->AllowScriptExtension(
422 frame, extension_name.utf8(), extension_group); 431 frame, extension_name.utf8(), extension_group);
423 } 432 }
424 433
425 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { 434 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) {
426 return content_settings_->AllowStorage(frame, local); 435 return content_settings_->AllowStorage(frame, local);
427 } 436 }
428 437
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 // Decode the favicon using WebKit's image decoder. 1027 // Decode the favicon using WebKit's image decoder.
1019 webkit_glue::ImageDecoder decoder( 1028 webkit_glue::ImageDecoder decoder(
1020 gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize)); 1029 gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize));
1021 const unsigned char* src_data = 1030 const unsigned char* src_data =
1022 reinterpret_cast<const unsigned char*>(&data[0]); 1031 reinterpret_cast<const unsigned char*>(&data[0]);
1023 1032
1024 return decoder.Decode(src_data, data.size()); 1033 return decoder.Decode(src_data, data.size());
1025 } 1034 }
1026 return SkBitmap(); 1035 return SkBitmap();
1027 } 1036 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698