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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1556 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) | 1556 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) |
1557 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages) | 1557 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages) |
1558 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, | 1558 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, |
1559 OnTextSurroundingSelectionRequest) | 1559 OnTextSurroundingSelectionRequest) |
1560 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest, | 1560 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest, |
1561 OnFocusedFormFieldDataRequest) | 1561 OnFocusedFormFieldDataRequest) |
1562 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, | 1562 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, |
1563 OnSetAccessibilityMode) | 1563 OnSetAccessibilityMode) |
1564 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, | 1564 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, |
1565 OnSnapshotAccessibilityTree) | 1565 OnSnapshotAccessibilityTree) |
| 1566 IPC_MESSAGE_HANDLER(FrameMsg_ExtractSmartClipData, OnExtractSmartClipData) |
1566 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 1567 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
1567 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1568 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
1568 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1569 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
1569 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1570 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
1570 OnSetFrameOwnerProperties) | 1571 OnSetFrameOwnerProperties) |
1571 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) | 1572 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
1572 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 1573 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
1573 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1574 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
1574 OnTextTrackSettingsChanged) | 1575 OnTextTrackSettingsChanged) |
1575 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1576 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 observer.AccessibilityModeChanged(); | 2135 observer.AccessibilityModeChanged(); |
2135 } | 2136 } |
2136 | 2137 |
2137 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { | 2138 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { |
2138 AXContentTreeUpdate response; | 2139 AXContentTreeUpdate response; |
2139 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); | 2140 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); |
2140 Send(new AccessibilityHostMsg_SnapshotResponse( | 2141 Send(new AccessibilityHostMsg_SnapshotResponse( |
2141 routing_id_, callback_id, response)); | 2142 routing_id_, callback_id, response)); |
2142 } | 2143 } |
2143 | 2144 |
| 2145 void RenderFrameImpl::OnExtractSmartClipData(uint32_t id, |
| 2146 const gfx::Rect& rect) { |
| 2147 blink::WebString clip_text; |
| 2148 blink::WebString clip_html; |
| 2149 GetWebFrame()->extractSmartClipData(rect, clip_text, clip_html); |
| 2150 Send(new FrameHostMsg_SmartClipDataExtracted( |
| 2151 routing_id_, id, clip_text.utf16(), clip_html.utf16())); |
| 2152 } |
| 2153 |
2144 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { | 2154 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { |
2145 WebFrame* opener = ResolveOpener(opener_routing_id); | 2155 WebFrame* opener = ResolveOpener(opener_routing_id); |
2146 frame_->setOpener(opener); | 2156 frame_->setOpener(opener); |
2147 } | 2157 } |
2148 | 2158 |
2149 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { | 2159 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { |
2150 frame_->setFrameOwnerSandboxFlags(flags); | 2160 frame_->setFrameOwnerSandboxFlags(flags); |
2151 } | 2161 } |
2152 | 2162 |
2153 void RenderFrameImpl::OnSetFrameOwnerProperties( | 2163 void RenderFrameImpl::OnSetFrameOwnerProperties( |
(...skipping 4680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6834 // event target. Potentially a Pepper plugin will receive the event. | 6844 // event target. Potentially a Pepper plugin will receive the event. |
6835 // In order to tell whether a plugin gets the last mouse event and which it | 6845 // In order to tell whether a plugin gets the last mouse event and which it |
6836 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6846 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6837 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6847 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6838 // |pepper_last_mouse_event_target_|. | 6848 // |pepper_last_mouse_event_target_|. |
6839 pepper_last_mouse_event_target_ = nullptr; | 6849 pepper_last_mouse_event_target_ = nullptr; |
6840 #endif | 6850 #endif |
6841 } | 6851 } |
6842 | 6852 |
6843 } // namespace content | 6853 } // namespace content |
OLD | NEW |