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

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: Cleanups after restructuring based on review feedback from @jam. 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
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 36ea32168c1c174d7ecdf2e022e5813ade7d6ff6..dfa6ee41d7eee9f4a92e1d8d7e5c233f0104fb71 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/document_state.h"
@@ -4239,6 +4240,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(

Powered by Google App Engine
This is Rietveld 408576698