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

Unified Diff: content/renderer/render_view_impl.cc

Issue 11378008: Raise an infobar and deny access to WebGL if a GPU reset was detected while a web page containing W… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work around build failure on Mac OS with 10.6 SDK. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/data/gpu/webgl.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 65939995bc45f598766a973b195e947bae9b5e9c..9f617a19f9962eaaa997fa65544ab624f3af1eda 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -52,6 +52,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/file_chooser_params.h"
+#include "content/public/common/three_d_api_types.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/renderer/context_menu_client.h"
@@ -4252,6 +4253,28 @@ WebKit::WebString RenderViewImpl::userAgentOverride(
return WebKit::WebString();
}
+bool RenderViewImpl::allowWebGL(WebFrame* frame, bool default_value) {
+ if (!default_value)
+ return false;
+
+ bool blocked = true;
+ Send(new ViewHostMsg_Are3DAPIsBlocked(
+ routing_id_,
+ GURL(frame->top()->document().securityOrigin().toString()),
+ THREE_D_API_TYPE_WEBGL,
+ &blocked));
+ return !blocked;
+}
+
+void RenderViewImpl::didLoseWebGLContext(
+ WebKit::WebFrame* frame,
+ int arb_robustness_status_code) {
+ Send(new ViewHostMsg_DidLose3DContext(
+ GURL(frame->top()->document().securityOrigin().toString()),
+ THREE_D_API_TYPE_WEBGL,
+ arb_robustness_status_code));
+}
+
// WebKit::WebPageSerializerClient implementation ------------------------------
void RenderViewImpl::didSerializeDataForFrame(
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/test/data/gpu/webgl.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698