Index: content/browser/browser_plugin/browser_plugin_guest.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc |
index 3248afdfb54b856da8d5e4bdc2dd847938571b1b..df6f623e5290b30f540d147c80be6f396aa05882 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest.cc |
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
@@ -606,6 +606,17 @@ void BrowserPluginGuest::DidStopLoading(RenderViewHost* render_view_host) { |
SendMessageToEmbedder(new BrowserPluginMsg_LoadStop(instance_id())); |
} |
+void BrowserPluginGuest::DidUpdateFrameName(int frame_id, |
+ bool is_top_level, |
+ const std::string& name, |
+ RenderViewHost* render_view_host) { |
+ if (!is_top_level) |
+ return; |
+ |
+ name_ = name; |
+ SendMessageToEmbedder(new BrowserPluginMsg_UpdatedName(instance_id_, name)); |
+} |
+ |
void BrowserPluginGuest::RenderViewReady() { |
// TODO(fsamuel): Investigate whether it's possible to update state earlier |
// here (see http://crbug.com/158151). |
@@ -617,7 +628,7 @@ void BrowserPluginGuest::RenderViewReady() { |
else |
rvh->DisableAutoResize(damage_view_size_); |
- Send(new ViewMsg_SetName(routing_id(), name_)); |
+ rvh->SetName(name_); |
jam
2013/04/09 16:11:51
is the intent that this file will move out content
|
RenderWidgetHostImpl::From(rvh)-> |
set_hung_renderer_delay_ms(guest_hang_timeout_); |
@@ -703,7 +714,6 @@ bool BrowserPluginGuest::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) |
IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) |
IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) |
- IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFrameName, OnUpdateFrameName) |
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
@@ -942,7 +952,7 @@ void BrowserPluginGuest::OnSetName(int instance_id, const std::string& name) { |
if (name == name_) |
return; |
name_ = name; |
- Send(new ViewMsg_SetName(routing_id(), name)); |
+ GetWebContents()->GetRenderViewHost()->SetName(name_); |
} |
void BrowserPluginGuest::OnSetSize( |
@@ -1107,16 +1117,6 @@ void BrowserPluginGuest::OnUpdateDragCursor( |
view->UpdateDragCursor(operation); |
} |
-void BrowserPluginGuest::OnUpdateFrameName(int frame_id, |
- bool is_top_level, |
- const std::string& name) { |
- if (!is_top_level) |
- return; |
- |
- name_ = name; |
- SendMessageToEmbedder(new BrowserPluginMsg_UpdatedName(instance_id_, name)); |
-} |
- |
void BrowserPluginGuest::RequestMediaAccessPermission( |
WebContents* web_contents, |
const MediaStreamRequest& request, |