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

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

Issue 48113021: Expose WebGL extension WEBGL_debug_renderer_info to Google domains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use WebPermissionClient hook instead Created 7 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) 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
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()),
Lei Zhang 2013/10/30 20:59:21 Why do we use frame->top()->document() here, when
Zhenyao Mo 2013/10/30 21:03:00 Ken, can you explain? I copied this from your all
Ken Russell (switch to Gerrit) 2013/10/30 21:35:49 The basic idea for allowWebGL() was that we wanted
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698