Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 3e59258baee9b473052226c735b95207bf476194..716fec1d48d33ccb6e0927e09962abc9cbca68c3 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -99,7 +99,7 @@ |
#include "content/renderer/text_input_client_observer.h" |
#include "content/renderer/v8_value_converter_impl.h" |
#include "content/renderer/web_intents_host.h" |
-#include "content/renderer/web_ui_bindings.h" |
+#include "content/renderer/web_ui_extension_data.h" |
#include "content/renderer/webplugin_delegate_proxy.h" |
#include "content/renderer/websharedworker_proxy.h" |
#include "media/base/filter_collection.h" |
@@ -707,6 +707,8 @@ RenderViewImpl::RenderViewImpl( |
ProcessViewLayoutFlags(command_line); |
+ new WebUIExtensionData(this); |
+ |
GetContentClient()->renderer()->RenderViewCreated(this); |
// If we have an opener_id but we weren't created by a renderer, then |
@@ -932,7 +934,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(DragMsg_SourceSystemDragEnded, |
OnDragSourceSystemDragEnded) |
IPC_MESSAGE_HANDLER(ViewMsg_AllowBindings, OnAllowBindings) |
- IPC_MESSAGE_HANDLER(ViewMsg_SetWebUIProperty, OnSetWebUIProperty) |
IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus) |
IPC_MESSAGE_HANDLER(ViewMsg_ScrollFocusedEditableNodeIntoRect, |
OnScrollFocusedEditableNodeIntoRect) |
@@ -3392,13 +3393,6 @@ void RenderViewImpl::didClearWindowObject(WebFrame* frame) { |
FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
DidClearWindowObject(frame)); |
- GURL frame_url = frame->document().url(); |
- if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) && |
- (frame_url.SchemeIs(chrome::kChromeUIScheme) || |
- frame_url.SchemeIs(chrome::kDataScheme))) { |
- GetWebUIBindings()->BindToJavascript(frame, "chrome"); |
- } |
- |
if (enabled_bindings_ & BINDINGS_POLICY_DOM_AUTOMATION) { |
if (!dom_automation_controller_.get()) |
dom_automation_controller_.reset(new DomAutomationController()); |
@@ -4609,14 +4603,6 @@ GURL RenderViewImpl::GetLoadingUrl(WebKit::WebFrame* frame) const { |
return request.url(); |
} |
-WebUIBindings* RenderViewImpl::GetWebUIBindings() { |
- if (!web_ui_bindings_.get()) { |
- web_ui_bindings_.reset(new WebUIBindings( |
- static_cast<RenderView*>(this), routing_id_)); |
- } |
- return web_ui_bindings_.get(); |
-} |
- |
WebKit::WebPlugin* RenderViewImpl::GetWebPluginFromPluginDocument() { |
return webview()->mainFrame()->document().to<WebPluginDocument>().plugin(); |
} |
@@ -5026,14 +5012,6 @@ void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { |
RenderProcess::current()->AddBindings(enabled_bindings_flags); |
} |
-void RenderViewImpl::OnSetWebUIProperty(const std::string& name, |
- const std::string& value) { |
- if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) |
- GetWebUIBindings()->SetProperty(name, value); |
- else |
- NOTREACHED() << "WebUI bindings not enabled."; |
-} |
- |
void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, |
const gfx::Point& client_point, |
const gfx::Point& screen_point, |