| 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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 OnSetAccessibilityMode) | 1575 OnSetAccessibilityMode) |
| 1576 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, | 1576 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, |
| 1577 OnSnapshotAccessibilityTree) | 1577 OnSnapshotAccessibilityTree) |
| 1578 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 1578 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
| 1579 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1579 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
| 1580 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1580 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
| 1581 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1581 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
| 1582 OnSetFrameOwnerProperties) | 1582 OnSetFrameOwnerProperties) |
| 1583 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) | 1583 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
| 1584 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 1584 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
| 1585 IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedFrame, OnClearFocusedFrame) | |
| 1586 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1585 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
| 1587 OnTextTrackSettingsChanged) | 1586 OnTextTrackSettingsChanged) |
| 1588 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1587 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
| 1589 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) | 1588 IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
| 1590 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, | 1589 IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
| 1591 OnGetSavableResourceLinks) | 1590 OnGetSavableResourceLinks) |
| 1592 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, | 1591 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
| 1593 OnGetSerializedHtmlWithLocalLinks) | 1592 OnGetSerializedHtmlWithLocalLinks) |
| 1594 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) | 1593 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) |
| 1595 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) | 1594 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2180 render_view_->webview()->advanceFocusAcrossFrames( | 2179 render_view_->webview()->advanceFocusAcrossFrames( |
| 2181 type, source_frame->web_frame(), frame_); | 2180 type, source_frame->web_frame(), frame_); |
| 2182 } | 2181 } |
| 2183 | 2182 |
| 2184 void RenderFrameImpl::OnSetFocusedFrame() { | 2183 void RenderFrameImpl::OnSetFocusedFrame() { |
| 2185 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur | 2184 // This uses focusDocumentView rather than setFocusedFrame so that focus/blur |
| 2186 // events are properly dispatched on any currently focused elements. | 2185 // events are properly dispatched on any currently focused elements. |
| 2187 render_view_->webview()->focusDocumentView(frame_); | 2186 render_view_->webview()->focusDocumentView(frame_); |
| 2188 } | 2187 } |
| 2189 | 2188 |
| 2190 void RenderFrameImpl::OnClearFocusedFrame() { | |
| 2191 render_view_->webview()->unfocusDocumentView(); | |
| 2192 } | |
| 2193 | |
| 2194 void RenderFrameImpl::OnTextTrackSettingsChanged( | 2189 void RenderFrameImpl::OnTextTrackSettingsChanged( |
| 2195 const FrameMsg_TextTrackSettings_Params& params) { | 2190 const FrameMsg_TextTrackSettings_Params& params) { |
| 2196 DCHECK(!frame_->parent()); | 2191 DCHECK(!frame_->parent()); |
| 2197 if (!render_view_->webview()) | 2192 if (!render_view_->webview()) |
| 2198 return; | 2193 return; |
| 2199 | 2194 |
| 2200 if (params.text_tracks_enabled) { | 2195 if (params.text_tracks_enabled) { |
| 2201 render_view_->webview()->settings()->setTextTrackKindUserPreference( | 2196 render_view_->webview()->settings()->setTextTrackKindUserPreference( |
| 2202 WebSettings::TextTrackKindUserPreference::Captions); | 2197 WebSettings::TextTrackKindUserPreference::Captions); |
| 2203 } else { | 2198 } else { |
| (...skipping 4375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6579 // event target. Potentially a Pepper plugin will receive the event. | 6574 // event target. Potentially a Pepper plugin will receive the event. |
| 6580 // In order to tell whether a plugin gets the last mouse event and which it | 6575 // In order to tell whether a plugin gets the last mouse event and which it |
| 6581 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6576 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6582 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6577 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6583 // |pepper_last_mouse_event_target_|. | 6578 // |pepper_last_mouse_event_target_|. |
| 6584 pepper_last_mouse_event_target_ = nullptr; | 6579 pepper_last_mouse_event_target_ = nullptr; |
| 6585 #endif | 6580 #endif |
| 6586 } | 6581 } |
| 6587 | 6582 |
| 6588 } // namespace content | 6583 } // namespace content |
| OLD | NEW |