| OLD | NEW |
| 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_render_view_observer.h" | 5 #include "chrome/renderer/chrome_render_view_observer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); | 747 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); |
| 748 | 748 |
| 749 if (!allow_running_insecure_content_ && !allowed_per_settings) { | 749 if (!allow_running_insecure_content_ && !allowed_per_settings) { |
| 750 content_settings_->DidNotAllowMixedScript(); | 750 content_settings_->DidNotAllowMixedScript(); |
| 751 return false; | 751 return false; |
| 752 } | 752 } |
| 753 | 753 |
| 754 return true; | 754 return true; |
| 755 } | 755 } |
| 756 | 756 |
| 757 bool ChromeRenderViewObserver::allowWebGLDebugRendererInfo(WebFrame* frame) { |
| 758 bool allowed = false; |
| 759 Send(new ChromeViewHostMsg_IsWebGLDebugRendererInfoAllowed( |
| 760 routing_id(), |
| 761 GURL(frame->top()->document().securityOrigin().toString().utf8()), |
| 762 &allowed)); |
| 763 return allowed; |
| 764 } |
| 765 |
| 757 void ChromeRenderViewObserver::didNotAllowPlugins(WebFrame* frame) { | 766 void ChromeRenderViewObserver::didNotAllowPlugins(WebFrame* frame) { |
| 758 content_settings_->DidNotAllowPlugins(); | 767 content_settings_->DidNotAllowPlugins(); |
| 759 } | 768 } |
| 760 | 769 |
| 761 void ChromeRenderViewObserver::didNotAllowScript(WebFrame* frame) { | 770 void ChromeRenderViewObserver::didNotAllowScript(WebFrame* frame) { |
| 762 content_settings_->DidNotAllowScript(); | 771 content_settings_->DidNotAllowScript(); |
| 763 } | 772 } |
| 764 | 773 |
| 765 void ChromeRenderViewObserver::OnSetIsPrerendering(bool is_prerendering) { | 774 void ChromeRenderViewObserver::OnSetIsPrerendering(bool is_prerendering) { |
| 766 if (is_prerendering) { | 775 if (is_prerendering) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 WebElement element = node.to<WebElement>(); | 1032 WebElement element = node.to<WebElement>(); |
| 1024 if (!element.hasTagName(tag_name)) | 1033 if (!element.hasTagName(tag_name)) |
| 1025 continue; | 1034 continue; |
| 1026 WebString value = element.getAttribute(attribute_name); | 1035 WebString value = element.getAttribute(attribute_name); |
| 1027 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) | 1036 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) |
| 1028 continue; | 1037 continue; |
| 1029 return true; | 1038 return true; |
| 1030 } | 1039 } |
| 1031 return false; | 1040 return false; |
| 1032 } | 1041 } |
| OLD | NEW |