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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) | 834 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) |
835 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) | 835 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) |
836 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, | 836 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, |
837 OnDidChangeLoadProgress) | 837 OnDidChangeLoadProgress) |
838 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, | 838 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, |
839 OnSerializeAsMHTMLResponse) | 839 OnSerializeAsMHTMLResponse) |
840 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) | 840 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) |
841 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 841 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
842 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, | 842 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, |
843 OnSetHasReceivedUserGesture) | 843 OnSetHasReceivedUserGesture) |
| 844 IPC_MESSAGE_HANDLER(FrameHostMsg_SetDevToolsFrameId, OnSetDevToolsFrameId) |
844 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) | 845 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
845 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) | 846 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) |
846 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) | 847 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) |
847 #endif | 848 #endif |
848 #if defined(OS_ANDROID) | 849 #if defined(OS_ANDROID) |
849 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder, | 850 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder, |
850 OnNavigationHandledByEmbedder) | 851 OnNavigationHandledByEmbedder) |
851 #endif | 852 #endif |
852 IPC_MESSAGE_HANDLER(FrameHostMsg_RequestOverlayRoutingToken, | 853 IPC_MESSAGE_HANDLER(FrameHostMsg_RequestOverlayRoutingToken, |
853 OnRequestOverlayRoutingToken) | 854 OnRequestOverlayRoutingToken) |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2460 delegate_->OnFocusedElementChangedInFrame( | 2461 delegate_->OnFocusedElementChangedInFrame( |
2461 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( | 2462 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( |
2462 bounds_in_frame_widget.origin()), | 2463 bounds_in_frame_widget.origin()), |
2463 bounds_in_frame_widget.size())); | 2464 bounds_in_frame_widget.size())); |
2464 } | 2465 } |
2465 | 2466 |
2466 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { | 2467 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { |
2467 frame_tree_node_->OnSetHasReceivedUserGesture(); | 2468 frame_tree_node_->OnSetHasReceivedUserGesture(); |
2468 } | 2469 } |
2469 | 2470 |
| 2471 void RenderFrameHostImpl::OnSetDevToolsFrameId( |
| 2472 const std::string& devtools_frame_id) { |
| 2473 untrusted_devtools_frame_id_ = devtools_frame_id; |
| 2474 } |
| 2475 |
2470 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) | 2476 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
2471 void RenderFrameHostImpl::OnShowPopup( | 2477 void RenderFrameHostImpl::OnShowPopup( |
2472 const FrameHostMsg_ShowPopup_Params& params) { | 2478 const FrameHostMsg_ShowPopup_Params& params) { |
2473 RenderViewHostDelegateView* view = | 2479 RenderViewHostDelegateView* view = |
2474 render_view_host_->delegate_->GetDelegateView(); | 2480 render_view_host_->delegate_->GetDelegateView(); |
2475 if (view) { | 2481 if (view) { |
2476 gfx::Point original_point(params.bounds.x(), params.bounds.y()); | 2482 gfx::Point original_point(params.bounds.x(), params.bounds.y()); |
2477 gfx::Point transformed_point = | 2483 gfx::Point transformed_point = |
2478 static_cast<RenderWidgetHostViewBase*>(GetView()) | 2484 static_cast<RenderWidgetHostViewBase*>(GetView()) |
2479 ->TransformPointToRootCoordSpace(original_point); | 2485 ->TransformPointToRootCoordSpace(original_point); |
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3896 } | 3902 } |
3897 | 3903 |
3898 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 3904 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
3899 const std::string& interface_name, | 3905 const std::string& interface_name, |
3900 mojo::ScopedMessagePipeHandle pipe) { | 3906 mojo::ScopedMessagePipeHandle pipe) { |
3901 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 3907 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
3902 } | 3908 } |
3903 #endif | 3909 #endif |
3904 | 3910 |
3905 } // namespace content | 3911 } // namespace content |
OLD | NEW |