OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 OnTextSurroundingSelectionRequest) | 1235 OnTextSurroundingSelectionRequest) |
1236 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, | 1236 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, |
1237 OnSetAccessibilityMode) | 1237 OnSetAccessibilityMode) |
1238 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, | 1238 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, |
1239 OnSnapshotAccessibilityTree) | 1239 OnSnapshotAccessibilityTree) |
1240 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 1240 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
1241 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1241 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
1242 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1242 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
1243 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1243 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
1244 OnSetFrameOwnerProperties) | 1244 OnSetFrameOwnerProperties) |
| 1245 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
1245 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1246 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
1246 OnTextTrackSettingsChanged) | 1247 OnTextTrackSettingsChanged) |
1247 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1248 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
1248 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) | 1249 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
1249 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, | 1250 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
1250 OnGetSavableResourceLinks) | 1251 OnGetSavableResourceLinks) |
1251 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, | 1252 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
1252 OnGetSerializedHtmlWithLocalLinks) | 1253 OnGetSerializedHtmlWithLocalLinks) |
1253 #if defined(OS_ANDROID) | 1254 #if defined(OS_ANDROID) |
1254 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) | 1255 IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItems, OnSelectPopupMenuItems) |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { | 1794 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { |
1794 frame_->setFrameOwnerSandboxFlags(flags); | 1795 frame_->setFrameOwnerSandboxFlags(flags); |
1795 } | 1796 } |
1796 | 1797 |
1797 void RenderFrameImpl::OnSetFrameOwnerProperties( | 1798 void RenderFrameImpl::OnSetFrameOwnerProperties( |
1798 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 1799 const blink::WebFrameOwnerProperties& frame_owner_properties) { |
1799 DCHECK(frame_); | 1800 DCHECK(frame_); |
1800 frame_->setFrameOwnerProperties(frame_owner_properties); | 1801 frame_->setFrameOwnerProperties(frame_owner_properties); |
1801 } | 1802 } |
1802 | 1803 |
| 1804 void RenderFrameImpl::OnAdvanceFocus(blink::WebFocusType type, |
| 1805 int32_t source_routing_id) { |
| 1806 RenderFrameProxy* source_frame = |
| 1807 RenderFrameProxy::FromRoutingID(source_routing_id); |
| 1808 if (!source_frame) |
| 1809 return; |
| 1810 |
| 1811 render_view_->webview()->advanceFocusAcrossFrames( |
| 1812 type, source_frame->web_frame(), frame_); |
| 1813 } |
| 1814 |
1803 void RenderFrameImpl::OnTextTrackSettingsChanged( | 1815 void RenderFrameImpl::OnTextTrackSettingsChanged( |
1804 const FrameMsg_TextTrackSettings_Params& params) { | 1816 const FrameMsg_TextTrackSettings_Params& params) { |
1805 DCHECK(!frame_->parent()); | 1817 DCHECK(!frame_->parent()); |
1806 if (!render_view_->webview()) | 1818 if (!render_view_->webview()) |
1807 return; | 1819 return; |
1808 | 1820 |
1809 if (params.text_tracks_enabled) { | 1821 if (params.text_tracks_enabled) { |
1810 render_view_->webview()->settings()->setTextTrackKindUserPreference( | 1822 render_view_->webview()->settings()->setTextTrackKindUserPreference( |
1811 WebSettings::TextTrackKindUserPreference::Captions); | 1823 WebSettings::TextTrackKindUserPreference::Captions); |
1812 } else { | 1824 } else { |
(...skipping 3679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5492 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5504 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
5493 scoped_refptr<media::AudioOutputDevice> device = | 5505 scoped_refptr<media::AudioOutputDevice> device = |
5494 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5506 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
5495 security_origin); | 5507 security_origin); |
5496 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5508 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
5497 device->Stop(); | 5509 device->Stop(); |
5498 callback.Run(status); | 5510 callback.Run(status); |
5499 } | 5511 } |
5500 | 5512 |
5501 } // namespace content | 5513 } // namespace content |
OLD | NEW |