summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_view_impl.cc
diff options
context:
space:
mode:
authorfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 02:49:25 +0000
committerfsamuel@chromium.org <fsamuel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 02:49:25 +0000
commit25bcc8ff25d5b94b84782783fc762a635d7b23d6 (patch)
treebc9236fdd4d639736778720bd5c468d03c6d03e6 /content/renderer/render_view_impl.cc
parent726ecd2526de747aa613daa6dffe4f2524bb6de8 (diff)
downloadchromium_src-25bcc8ff25d5b94b84782783fc762a635d7b23d6.zip
chromium_src-25bcc8ff25d5b94b84782783fc762a635d7b23d6.tar.gz
chromium_src-25bcc8ff25d5b94b84782783fc762a635d7b23d6.tar.bz2
<webview>: Add name attribute
This change requires this WebKit patch: https://bugs.webkit.org/show_bug.cgi?id=104404 This change enables access to the guest's window's name attribute from the embedder <webview>. It also enables changes to the window name attribute from the embedder WebContents. BUG=140316 Test=BrowserPluginHostTest.ChangeWindowName Review URL: https://codereview.chromium.org/11554030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_view_impl.cc')
-rw-r--r--content/renderer/render_view_impl.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 1dcfe80..c0f21d3 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -964,6 +964,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_PasteAndMatchStyle, OnPasteAndMatchStyle)
IPC_MESSAGE_HANDLER(ViewMsg_Replace, OnReplace)
IPC_MESSAGE_HANDLER(ViewMsg_Delete, OnDelete)
+ IPC_MESSAGE_HANDLER(ViewMsg_SetName, OnSetName)
IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll)
IPC_MESSAGE_HANDLER(ViewMsg_Unselect, OnUnselect)
IPC_MESSAGE_HANDLER(ViewMsg_SetEditableSelectionOffsets,
@@ -1386,6 +1387,13 @@ void RenderViewImpl::OnDelete() {
webview()->focusedFrame()->executeCommand(WebString::fromUTF8("Delete"));
}
+void RenderViewImpl::OnSetName(const std::string& name) {
+ if (!webview())
+ return;
+
+ webview()->mainFrame()->setName(WebString::fromUTF8(name));
+}
+
void RenderViewImpl::OnSelectAll() {
if (!webview())
return;
@@ -2730,6 +2738,14 @@ void RenderViewImpl::willClose(WebFrame* frame) {
FOR_EACH_OBSERVER(RenderViewObserver, observers_, FrameWillClose(frame));
}
+void RenderViewImpl::didChangeName(WebFrame* frame,
+ const WebString& name) {
+ Send(new ViewHostMsg_UpdateFrameName(routing_id_,
+ frame->identifier(),
+ !frame->parent(),
+ UTF16ToUTF8(name)));
+}
+
void RenderViewImpl::loadURLExternally(
WebFrame* frame, const WebURLRequest& request,
WebNavigationPolicy policy) {