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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) | 1567 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) |
1568 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages) | 1568 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages) |
1569 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, | 1569 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, |
1570 OnTextSurroundingSelectionRequest) | 1570 OnTextSurroundingSelectionRequest) |
1571 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest, | 1571 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest, |
1572 OnFocusedFormFieldDataRequest) | 1572 OnFocusedFormFieldDataRequest) |
1573 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, | 1573 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, |
1574 OnSetAccessibilityMode) | 1574 OnSetAccessibilityMode) |
1575 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, | 1575 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, |
1576 OnSnapshotAccessibilityTree) | 1576 OnSnapshotAccessibilityTree) |
| 1577 IPC_MESSAGE_HANDLER(FrameMsg_ExtractSmartClipData, OnExtractSmartClipData) |
1577 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) | 1578 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) |
1578 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) | 1579 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) |
1579 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) | 1580 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) |
1580 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, | 1581 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, |
1581 OnSetFrameOwnerProperties) | 1582 OnSetFrameOwnerProperties) |
1582 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) | 1583 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) |
1583 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) | 1584 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) |
1584 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, | 1585 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, |
1585 OnTextTrackSettingsChanged) | 1586 OnTextTrackSettingsChanged) |
1586 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) | 1587 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2145 observer.AccessibilityModeChanged(); | 2146 observer.AccessibilityModeChanged(); |
2146 } | 2147 } |
2147 | 2148 |
2148 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { | 2149 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { |
2149 AXContentTreeUpdate response; | 2150 AXContentTreeUpdate response; |
2150 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); | 2151 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); |
2151 Send(new AccessibilityHostMsg_SnapshotResponse( | 2152 Send(new AccessibilityHostMsg_SnapshotResponse( |
2152 routing_id_, callback_id, response)); | 2153 routing_id_, callback_id, response)); |
2153 } | 2154 } |
2154 | 2155 |
| 2156 void RenderFrameImpl::OnExtractSmartClipData(int id, const gfx::Rect& rect) { |
| 2157 blink::WebString clip_text; |
| 2158 blink::WebString clip_html; |
| 2159 GetWebFrame()->extractSmartClipData(rect, clip_text, clip_html); |
| 2160 Send(new FrameHostMsg_SmartClipDataExtracted( |
| 2161 routing_id_, id, clip_text.utf16(), clip_html.utf16())); |
| 2162 } |
| 2163 |
2155 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { | 2164 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { |
2156 WebFrame* opener = ResolveOpener(opener_routing_id); | 2165 WebFrame* opener = ResolveOpener(opener_routing_id); |
2157 frame_->setOpener(opener); | 2166 frame_->setOpener(opener); |
2158 } | 2167 } |
2159 | 2168 |
2160 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { | 2169 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { |
2161 frame_->setFrameOwnerSandboxFlags(flags); | 2170 frame_->setFrameOwnerSandboxFlags(flags); |
2162 } | 2171 } |
2163 | 2172 |
2164 void RenderFrameImpl::OnSetFrameOwnerProperties( | 2173 void RenderFrameImpl::OnSetFrameOwnerProperties( |
(...skipping 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6828 // event target. Potentially a Pepper plugin will receive the event. | 6837 // event target. Potentially a Pepper plugin will receive the event. |
6829 // In order to tell whether a plugin gets the last mouse event and which it | 6838 // In order to tell whether a plugin gets the last mouse event and which it |
6830 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6839 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6831 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6840 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6832 // |pepper_last_mouse_event_target_|. | 6841 // |pepper_last_mouse_event_target_|. |
6833 pepper_last_mouse_event_target_ = nullptr; | 6842 pepper_last_mouse_event_target_ = nullptr; |
6834 #endif | 6843 #endif |
6835 } | 6844 } |
6836 | 6845 |
6837 } // namespace content | 6846 } // namespace content |
OLD | NEW |