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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1046933005: Refactor postMessage for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable SupportCrossProcessPostMessage test on FYI bots Created 5 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) 860 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState)
861 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) 861 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL)
862 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) 862 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose)
863 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) 863 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove)
864 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, 864 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame,
865 OnDocumentAvailableInMainFrame) 865 OnDocumentAvailableInMainFrame)
866 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, 866 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
867 OnDidContentsPreferredSizeChange) 867 OnDidContentsPreferredSizeChange)
868 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, 868 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent,
869 OnRouteCloseEvent) 869 OnRouteCloseEvent)
870 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent)
871 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) 870 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging)
872 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) 871 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor)
873 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) 872 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK)
874 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) 873 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
875 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 874 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
876 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) 875 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK)
877 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) 876 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
878 IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorIsOneChanged, 877 IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorIsOneChanged,
879 OnPageScaleFactorIsOneChanged) 878 OnPageScaleFactorIsOneChanged)
880 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 879 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 1053
1055 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) { 1054 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) {
1056 delegate_->ResizeDueToAutoResize(new_size); 1055 delegate_->ResizeDueToAutoResize(new_size);
1057 } 1056 }
1058 1057
1059 void RenderViewHostImpl::OnRouteCloseEvent() { 1058 void RenderViewHostImpl::OnRouteCloseEvent() {
1060 // Have the delegate route this to the active RenderViewHost. 1059 // Have the delegate route this to the active RenderViewHost.
1061 delegate_->RouteCloseEvent(this); 1060 delegate_->RouteCloseEvent(this);
1062 } 1061 }
1063 1062
1064 void RenderViewHostImpl::OnRouteMessageEvent(
1065 const ViewMsg_PostMessage_Params& params) {
1066 // Give to the delegate to route to the active RenderViewHost.
1067 delegate_->RouteMessageEvent(this, params);
1068 }
1069
1070 void RenderViewHostImpl::OnStartDragging( 1063 void RenderViewHostImpl::OnStartDragging(
1071 const DropData& drop_data, 1064 const DropData& drop_data,
1072 WebDragOperationsMask drag_operations_mask, 1065 WebDragOperationsMask drag_operations_mask,
1073 const SkBitmap& bitmap, 1066 const SkBitmap& bitmap,
1074 const gfx::Vector2d& bitmap_offset_in_dip, 1067 const gfx::Vector2d& bitmap_offset_in_dip,
1075 const DragEventSourceInfo& event_info) { 1068 const DragEventSourceInfo& event_info) {
1076 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 1069 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1077 if (!view) 1070 if (!view)
1078 return; 1071 return;
1079 1072
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 FrameTree* frame_tree = delegate_->GetFrameTree(); 1413 FrameTree* frame_tree = delegate_->GetFrameTree();
1421 1414
1422 frame_tree->ResetForMainFrameSwap(); 1415 frame_tree->ResetForMainFrameSwap();
1423 } 1416 }
1424 1417
1425 void RenderViewHostImpl::SelectWordAroundCaret() { 1418 void RenderViewHostImpl::SelectWordAroundCaret() {
1426 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1419 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1427 } 1420 }
1428 1421
1429 } // namespace content 1422 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698