Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2667283007: Refactor Samsung SmartClip implementation. (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload) 1553 IPC_MESSAGE_HANDLER(FrameMsg_Reload, OnReload)
1554 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages) 1554 IPC_MESSAGE_HANDLER(FrameMsg_ReloadLoFiImages, OnReloadLoFiImages)
1555 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest, 1555 IPC_MESSAGE_HANDLER(FrameMsg_TextSurroundingSelectionRequest,
1556 OnTextSurroundingSelectionRequest) 1556 OnTextSurroundingSelectionRequest)
1557 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest, 1557 IPC_MESSAGE_HANDLER(FrameMsg_FocusedFormFieldDataRequest,
1558 OnFocusedFormFieldDataRequest) 1558 OnFocusedFormFieldDataRequest)
1559 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode, 1559 IPC_MESSAGE_HANDLER(FrameMsg_SetAccessibilityMode,
1560 OnSetAccessibilityMode) 1560 OnSetAccessibilityMode)
1561 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree, 1561 IPC_MESSAGE_HANDLER(AccessibilityMsg_SnapshotTree,
1562 OnSnapshotAccessibilityTree) 1562 OnSnapshotAccessibilityTree)
1563 IPC_MESSAGE_HANDLER(FrameMsg_ExtractSmartClipData, OnExtractSmartClipData)
1563 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener) 1564 IPC_MESSAGE_HANDLER(FrameMsg_UpdateOpener, OnUpdateOpener)
1564 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation) 1565 IPC_MESSAGE_HANDLER(FrameMsg_CommitNavigation, OnCommitNavigation)
1565 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags) 1566 IPC_MESSAGE_HANDLER(FrameMsg_DidUpdateSandboxFlags, OnDidUpdateSandboxFlags)
1566 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties, 1567 IPC_MESSAGE_HANDLER(FrameMsg_SetFrameOwnerProperties,
1567 OnSetFrameOwnerProperties) 1568 OnSetFrameOwnerProperties)
1568 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus) 1569 IPC_MESSAGE_HANDLER(FrameMsg_AdvanceFocus, OnAdvanceFocus)
1569 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) 1570 IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame)
1570 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings, 1571 IPC_MESSAGE_HANDLER(FrameMsg_SetTextTrackSettings,
1571 OnTextTrackSettingsChanged) 1572 OnTextTrackSettingsChanged)
1572 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent) 1573 IPC_MESSAGE_HANDLER(FrameMsg_PostMessageEvent, OnPostMessageEvent)
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 observer.AccessibilityModeChanged(); 2132 observer.AccessibilityModeChanged();
2132 } 2133 }
2133 2134
2134 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) { 2135 void RenderFrameImpl::OnSnapshotAccessibilityTree(int callback_id) {
2135 AXContentTreeUpdate response; 2136 AXContentTreeUpdate response;
2136 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response); 2137 RenderAccessibilityImpl::SnapshotAccessibilityTree(this, &response);
2137 Send(new AccessibilityHostMsg_SnapshotResponse( 2138 Send(new AccessibilityHostMsg_SnapshotResponse(
2138 routing_id_, callback_id, response)); 2139 routing_id_, callback_id, response));
2139 } 2140 }
2140 2141
2142 void RenderFrameImpl::OnExtractSmartClipData(int id, const gfx::Rect& rect) {
2143 blink::WebString clip_text;
2144 blink::WebString clip_html;
2145 GetWebFrame()->extractSmartClipData(rect, clip_text, clip_html);
2146 Send(new FrameHostMsg_SmartClipDataExtracted(
2147 routing_id_, id, clip_text.utf16(), clip_html.utf16()));
2148 }
2149
2141 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) { 2150 void RenderFrameImpl::OnUpdateOpener(int opener_routing_id) {
2142 WebFrame* opener = ResolveOpener(opener_routing_id); 2151 WebFrame* opener = ResolveOpener(opener_routing_id);
2143 frame_->setOpener(opener); 2152 frame_->setOpener(opener);
2144 } 2153 }
2145 2154
2146 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) { 2155 void RenderFrameImpl::OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags) {
2147 frame_->setFrameOwnerSandboxFlags(flags); 2156 frame_->setFrameOwnerSandboxFlags(flags);
2148 } 2157 }
2149 2158
2150 void RenderFrameImpl::OnSetFrameOwnerProperties( 2159 void RenderFrameImpl::OnSetFrameOwnerProperties(
(...skipping 4669 matching lines...) Expand 10 before | Expand all | Expand 10 after
6820 // event target. Potentially a Pepper plugin will receive the event. 6829 // event target. Potentially a Pepper plugin will receive the event.
6821 // In order to tell whether a plugin gets the last mouse event and which it 6830 // In order to tell whether a plugin gets the last mouse event and which it
6822 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6831 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6823 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6832 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6824 // |pepper_last_mouse_event_target_|. 6833 // |pepper_last_mouse_event_target_|.
6825 pepper_last_mouse_event_target_ = nullptr; 6834 pepper_last_mouse_event_target_ = nullptr;
6826 #endif 6835 #endif
6827 } 6836 }
6828 6837
6829 } // namespace content 6838 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698