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

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: Charlie's nits 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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState) 851 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateState, OnUpdateState)
852 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL) 852 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateTargetURL, OnUpdateTargetURL)
853 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) 853 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose)
854 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) 854 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove)
855 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame, 855 IPC_MESSAGE_HANDLER(ViewHostMsg_DocumentAvailableInMainFrame,
856 OnDocumentAvailableInMainFrame) 856 OnDocumentAvailableInMainFrame)
857 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, 857 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
858 OnDidContentsPreferredSizeChange) 858 OnDidContentsPreferredSizeChange)
859 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent, 859 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent,
860 OnRouteCloseEvent) 860 OnRouteCloseEvent)
861 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteMessageEvent, OnRouteMessageEvent)
862 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) 861 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging)
863 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) 862 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor)
864 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) 863 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK)
865 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) 864 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
866 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 865 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
867 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK) 866 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnClosePageACK)
868 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) 867 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
869 IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorIsOneChanged, 868 IPC_MESSAGE_HANDLER(ViewHostMsg_PageScaleFactorIsOneChanged,
870 OnPageScaleFactorIsOneChanged) 869 OnPageScaleFactorIsOneChanged)
871 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 870 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1044
1046 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) { 1045 void RenderViewHostImpl::OnRenderAutoResized(const gfx::Size& new_size) {
1047 delegate_->ResizeDueToAutoResize(new_size); 1046 delegate_->ResizeDueToAutoResize(new_size);
1048 } 1047 }
1049 1048
1050 void RenderViewHostImpl::OnRouteCloseEvent() { 1049 void RenderViewHostImpl::OnRouteCloseEvent() {
1051 // Have the delegate route this to the active RenderViewHost. 1050 // Have the delegate route this to the active RenderViewHost.
1052 delegate_->RouteCloseEvent(this); 1051 delegate_->RouteCloseEvent(this);
1053 } 1052 }
1054 1053
1055 void RenderViewHostImpl::OnRouteMessageEvent(
1056 const ViewMsg_PostMessage_Params& params) {
1057 // Give to the delegate to route to the active RenderViewHost.
1058 delegate_->RouteMessageEvent(this, params);
1059 }
1060
1061 void RenderViewHostImpl::OnStartDragging( 1054 void RenderViewHostImpl::OnStartDragging(
1062 const DropData& drop_data, 1055 const DropData& drop_data,
1063 WebDragOperationsMask drag_operations_mask, 1056 WebDragOperationsMask drag_operations_mask,
1064 const SkBitmap& bitmap, 1057 const SkBitmap& bitmap,
1065 const gfx::Vector2d& bitmap_offset_in_dip, 1058 const gfx::Vector2d& bitmap_offset_in_dip,
1066 const DragEventSourceInfo& event_info) { 1059 const DragEventSourceInfo& event_info) {
1067 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 1060 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1068 if (!view) 1061 if (!view)
1069 return; 1062 return;
1070 1063
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 FrameTree* frame_tree = delegate_->GetFrameTree(); 1377 FrameTree* frame_tree = delegate_->GetFrameTree();
1385 1378
1386 frame_tree->ResetForMainFrameSwap(); 1379 frame_tree->ResetForMainFrameSwap();
1387 } 1380 }
1388 1381
1389 void RenderViewHostImpl::SelectWordAroundCaret() { 1382 void RenderViewHostImpl::SelectWordAroundCaret() {
1390 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1383 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1391 } 1384 }
1392 1385
1393 } // namespace content 1386 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698