| 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 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 OnSetAccessibilityMode) | 1548 OnSetAccessibilityMode) |
| 1549 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, | 1549 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, |
| 1550 OnSnapshotAccessibilityTree) | 1550 OnSnapshotAccessibilityTree) |
| 1551 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 1551 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
| 1552 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1552 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
| 1553 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1553 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
| 1554 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1554 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
| 1555 OnSetFrameOwnerProperties) | 1555 OnSetFrameOwnerProperties) |
| 1556 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) | 1556 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
| 1557 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 1557 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
| 1558 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedFrame, OnClearFocusedFrame) |
| 1558 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1559 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
| 1559 OnTextTrackSettingsChanged) | 1560 OnTextTrackSettingsChanged) |
| 1560 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1561 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
| 1561 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) | 1562 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
| 1562 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, | 1563 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
| 1563 OnGetSavableResourceLinks) | 1564 OnGetSavableResourceLinks) |
| 1564 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, | 1565 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
| 1565 OnGetSerializedHtmlWithLocalLinks) | 1566 OnGetSerializedHtmlWithLocalLinks) |
| 1566 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1567 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
| 1567 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1568 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 render_view_->webview()->advanceFocusAcrossFrames( | 2149 render_view_->webview()->advanceFocusAcrossFrames( |
| 2149 type, source_frame->web_frame(), frame_); | 2150 type, source_frame->web_frame(), frame_); |
| 2150 } | 2151 } |
| 2151 | 2152 |
| 2152 void RenderFrameImpl::OnSetFocusedFrame() { | 2153 void RenderFrameImpl::OnSetFocusedFrame() { |
| 2153 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur | 2154 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur |
| 2154 // events are properly dispatched on any currently focused elements. | 2155 // events are properly dispatched on any currently focused elements. |
| 2155 render_view_->webview()->focusDocumentView(frame_); | 2156 render_view_->webview()->focusDocumentView(frame_); |
| 2156 } | 2157 } |
| 2157 | 2158 |
| 2159 void RenderFrameImpl::OnClearFocusedFrame() { |
| 2160 render_view_->webview()->unfocusDocumentView(); |
| 2161 } |
| 2162 |
| 2158 void RenderFrameImpl::OnTextTrackSettingsChanged( | 2163 void RenderFrameImpl::OnTextTrackSettingsChanged( |
| 2159 const FrameMsg_TextTrackSettings_Params& params) { | 2164 const FrameMsg_TextTrackSettings_Params& params) { |
| 2160 DCHECK(!frame_->parent()); | 2165 DCHECK(!frame_->parent()); |
| 2161 if (!render_view_->webview()) | 2166 if (!render_view_->webview()) |
| 2162 return; | 2167 return; |
| 2163 | 2168 |
| 2164 if (params.text_tracks_enabled) { | 2169 if (params.text_tracks_enabled) { |
| 2165 render_view_->webview()->settings()->setTextTrackKindUserPreference( | 2170 render_view_->webview()->settings()->setTextTrackKindUserPreference( |
| 2166 WebSettings::TextTrackKindUserPreference::Captions); | 2171 WebSettings::TextTrackKindUserPreference::Captions); |
| 2167 } else { | 2172 } else { |
| (...skipping 4165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6333 // event target. Potentially a Pepper plugin will receive the event. | 6338 // event target. Potentially a Pepper plugin will receive the event. |
| 6334 // In order to tell whether a plugin gets the last mouse event and which it | 6339 // In order to tell whether a plugin gets the last mouse event and which it |
| 6335 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6340 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6336 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6341 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6337 // |pepper_last_mouse_event_target_|. | 6342 // |pepper_last_mouse_event_target_|. |
| 6338 pepper_last_mouse_event_target_ = nullptr; | 6343 pepper_last_mouse_event_target_ = nullptr; |
| 6339 #endif | 6344 #endif |
| 6340 } | 6345 } |
| 6341 | 6346 |
| 6342 } // namespace content | 6347 } // namespace content |
| OLD | NEW |