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 int source_routing_id) { | |
1806 RenderFrameProxy* source_frame = | |
1807 RenderFrameProxy::FromRoutingID(source_routing_id); | |
1808 | |
1809 render_view_->webview()->advanceFocusAcrossFrames( | |
1810 type, source_frame->web_frame(), frame_); | |
Charlie Reis
2015/12/04 21:44:50
Should we null check source_frame?
alexmos
2015/12/04 22:21:18
Done. I suppose this is possible with race condit
Charlie Reis
2015/12/04 22:27:04
Acknowledged.
| |
1811 } | |
1812 | |
1803 void RenderFrameImpl::OnTextTrackSettingsChanged( | 1813 void RenderFrameImpl::OnTextTrackSettingsChanged( |
1804 const FrameMsg_TextTrackSettings_Params& params) { | 1814 const FrameMsg_TextTrackSettings_Params& params) { |
1805 DCHECK(!frame_->parent()); | 1815 DCHECK(!frame_->parent()); |
1806 if (!render_view_->webview()) | 1816 if (!render_view_->webview()) |
1807 return; | 1817 return; |
1808 | 1818 |
1809 if (params.text_tracks_enabled) { | 1819 if (params.text_tracks_enabled) { |
1810 render_view_->webview()->settings()->setTextTrackKindUserPreference( | 1820 render_view_->webview()->settings()->setTextTrackKindUserPreference( |
1811 WebSettings::TextTrackKindUserPreference::Captions); | 1821 WebSettings::TextTrackKindUserPreference::Captions); |
1812 } else { | 1822 } else { |
(...skipping 3679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5492 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5502 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
5493 scoped_refptr<media::AudioOutputDevice> device = | 5503 scoped_refptr<media::AudioOutputDevice> device = |
5494 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5504 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
5495 security_origin); | 5505 security_origin); |
5496 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5506 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
5497 device->Stop(); | 5507 device->Stop(); |
5498 callback.Run(status); | 5508 callback.Run(status); |
5499 } | 5509 } |
5500 | 5510 |
5501 } // namespace content | 5511 } // namespace content |
OLD | NEW |