OLD | NEW |
---|---|
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 Loading... | |
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, bool enabled_per_settings, | |
jochen (gone - plz use gerrit)
2011/11/02 09:25:05
nit. each parameter on its own line
marja
2011/11/02 14:46:35
Done.
| |
421 const WebURL& script_url) { | |
422 return content_settings_->AllowScriptFromSource(frame, enabled_per_settings, | |
423 script_url); | |
424 } | |
425 | |
419 bool ChromeRenderViewObserver::allowScriptExtension( | 426 bool ChromeRenderViewObserver::allowScriptExtension( |
420 WebFrame* frame, const WebString& extension_name, int extension_group) { | 427 WebFrame* frame, const WebString& extension_name, int extension_group) { |
421 return extension_dispatcher_->AllowScriptExtension( | 428 return extension_dispatcher_->AllowScriptExtension( |
422 frame, extension_name.utf8(), extension_group); | 429 frame, extension_name.utf8(), extension_group); |
423 } | 430 } |
424 | 431 |
425 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { | 432 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { |
426 return content_settings_->AllowStorage(frame, local); | 433 return content_settings_->AllowStorage(frame, local); |
427 } | 434 } |
428 | 435 |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1018 // Decode the favicon using WebKit's image decoder. | 1025 // Decode the favicon using WebKit's image decoder. |
1019 webkit_glue::ImageDecoder decoder( | 1026 webkit_glue::ImageDecoder decoder( |
1020 gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize)); | 1027 gfx::Size(gfx::kFaviconSize, gfx::kFaviconSize)); |
1021 const unsigned char* src_data = | 1028 const unsigned char* src_data = |
1022 reinterpret_cast<const unsigned char*>(&data[0]); | 1029 reinterpret_cast<const unsigned char*>(&data[0]); |
1023 | 1030 |
1024 return decoder.Decode(src_data, data.size()); | 1031 return decoder.Decode(src_data, data.size()); |
1025 } | 1032 } |
1026 return SkBitmap(); | 1033 return SkBitmap(); |
1027 } | 1034 } |
OLD | NEW |