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

Unified Diff: content/renderer/render_view_impl.cc

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add TODO and merge to trunk Created 6 years, 9 months 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/mojo/mojo_render_process_observer.cc ('k') | content/renderer/web_ui_mojo.h » ('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 8deab6120f0b8a9c331bc7fb887c7d95358cb352..c4d84605e09f153528bdf987d7650bf9a4df1431 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -238,6 +238,10 @@
#include "content/renderer/media/rtc_peer_connection_handler.h"
#endif
+#if defined(USE_MOJO)
+#include "content/renderer/web_ui_mojo.h"
+#endif
+
using blink::WebAXObject;
using blink::WebApplicationCacheHost;
using blink::WebApplicationCacheHostClient;
@@ -3521,7 +3525,12 @@ void RenderViewImpl::OnPostMessageEvent(
void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) {
if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) &&
!(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) {
+ // WebUIExtensionData deletes itself when we're destroyed.
new WebUIExtensionData(this);
+#if defined(USE_MOJO)
+ // WebUIMojo deletes itself when we're destroyed.
+ new WebUIMojo(this);
+#endif
}
enabled_bindings_ |= enabled_bindings_flags;
« no previous file with comments | « content/renderer/mojo/mojo_render_process_observer.cc ('k') | content/renderer/web_ui_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698