| 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); | 755 SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF); |
| 756 | 756 |
| 757 if (!allow_running_insecure_content_ && !allowed_per_settings) { | 757 if (!allow_running_insecure_content_ && !allowed_per_settings) { |
| 758 content_settings_->DidNotAllowMixedScript(); | 758 content_settings_->DidNotAllowMixedScript(); |
| 759 return false; | 759 return false; |
| 760 } | 760 } |
| 761 | 761 |
| 762 return true; | 762 return true; |
| 763 } | 763 } |
| 764 | 764 |
| 765 bool ChromeRenderViewObserver::allowWebGLDebugRendererInfo(WebFrame* frame) { |
| 766 bool allowed = false; |
| 767 Send(new ChromeViewHostMsg_IsWebGLDebugRendererInfoAllowed( |
| 768 routing_id(), |
| 769 GURL(frame->top()->document().securityOrigin().toString().utf8()), |
| 770 &allowed)); |
| 771 return allowed; |
| 772 } |
| 773 |
| 765 void ChromeRenderViewObserver::didNotAllowPlugins(WebFrame* frame) { | 774 void ChromeRenderViewObserver::didNotAllowPlugins(WebFrame* frame) { |
| 766 content_settings_->DidNotAllowPlugins(); | 775 content_settings_->DidNotAllowPlugins(); |
| 767 } | 776 } |
| 768 | 777 |
| 769 void ChromeRenderViewObserver::didNotAllowScript(WebFrame* frame) { | 778 void ChromeRenderViewObserver::didNotAllowScript(WebFrame* frame) { |
| 770 content_settings_->DidNotAllowScript(); | 779 content_settings_->DidNotAllowScript(); |
| 771 } | 780 } |
| 772 | 781 |
| 773 void ChromeRenderViewObserver::OnSetIsPrerendering(bool is_prerendering) { | 782 void ChromeRenderViewObserver::OnSetIsPrerendering(bool is_prerendering) { |
| 774 if (is_prerendering) { | 783 if (is_prerendering) { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 WebElement element = node.to<WebElement>(); | 1040 WebElement element = node.to<WebElement>(); |
| 1032 if (!element.hasTagName(tag_name)) | 1041 if (!element.hasTagName(tag_name)) |
| 1033 continue; | 1042 continue; |
| 1034 WebString value = element.getAttribute(attribute_name); | 1043 WebString value = element.getAttribute(attribute_name); |
| 1035 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) | 1044 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) |
| 1036 continue; | 1045 continue; |
| 1037 return true; | 1046 return true; |
| 1038 } | 1047 } |
| 1039 return false; | 1048 return false; |
| 1040 } | 1049 } |
| OLD | NEW |