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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) | 751 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) |
752 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) | 752 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) |
753 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, | 753 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, |
754 OnDidChangeLoadProgress) | 754 OnDidChangeLoadProgress) |
755 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, | 755 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, |
756 OnSerializeAsMHTMLResponse) | 756 OnSerializeAsMHTMLResponse) |
757 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) | 757 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) |
758 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 758 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
759 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, | 759 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, |
760 OnSetHasReceivedUserGesture) | 760 OnSetHasReceivedUserGesture) |
761 #if defined(USE_EXTERNAL_POPUP_MENU) | 761 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
762 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) | 762 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) |
763 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) | 763 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) |
764 #endif | 764 #endif |
765 #if defined(OS_ANDROID) | 765 #if defined(OS_ANDROID) |
766 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder, | 766 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder, |
767 OnNavigationHandledByEmbedder) | 767 OnNavigationHandledByEmbedder) |
768 #endif | 768 #endif |
769 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) | 769 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) |
770 IPC_END_MESSAGE_MAP() | 770 IPC_END_MESSAGE_MAP() |
771 | 771 |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 delegate_->OnFocusedElementChangedInFrame( | 2241 delegate_->OnFocusedElementChangedInFrame( |
2242 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( | 2242 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( |
2243 bounds_in_frame_widget.origin()), | 2243 bounds_in_frame_widget.origin()), |
2244 bounds_in_frame_widget.size())); | 2244 bounds_in_frame_widget.size())); |
2245 } | 2245 } |
2246 | 2246 |
2247 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { | 2247 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { |
2248 frame_tree_node_->OnSetHasReceivedUserGesture(); | 2248 frame_tree_node_->OnSetHasReceivedUserGesture(); |
2249 } | 2249 } |
2250 | 2250 |
2251 #if defined(USE_EXTERNAL_POPUP_MENU) | 2251 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
2252 void RenderFrameHostImpl::OnShowPopup( | 2252 void RenderFrameHostImpl::OnShowPopup( |
2253 const FrameHostMsg_ShowPopup_Params& params) { | 2253 const FrameHostMsg_ShowPopup_Params& params) { |
2254 RenderViewHostDelegateView* view = | 2254 RenderViewHostDelegateView* view = |
2255 render_view_host_->delegate_->GetDelegateView(); | 2255 render_view_host_->delegate_->GetDelegateView(); |
2256 if (view) { | 2256 if (view) { |
2257 gfx::Point original_point(params.bounds.x(), params.bounds.y()); | 2257 gfx::Point original_point(params.bounds.x(), params.bounds.y()); |
2258 gfx::Point transformed_point = | 2258 gfx::Point transformed_point = |
2259 static_cast<RenderWidgetHostViewBase*>(GetView()) | 2259 static_cast<RenderWidgetHostViewBase*>(GetView()) |
2260 ->TransformPointToRootCoordSpace(original_point); | 2260 ->TransformPointToRootCoordSpace(original_point); |
2261 gfx::Rect transformed_bounds(transformed_point.x(), transformed_point.y(), | 2261 gfx::Rect transformed_bounds(transformed_point.x(), transformed_point.y(), |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3090 mojom::kNavigation_FrameSpec, browser_info_.interface_provider_specs, | 3090 mojom::kNavigation_FrameSpec, browser_info_.interface_provider_specs, |
3091 &browser_spec); | 3091 &browser_spec); |
3092 service_manager::GetInterfaceProviderSpec( | 3092 service_manager::GetInterfaceProviderSpec( |
3093 mojom::kNavigation_FrameSpec, renderer_info_.interface_provider_specs, | 3093 mojom::kNavigation_FrameSpec, renderer_info_.interface_provider_specs, |
3094 &renderer_spec); | 3094 &renderer_spec); |
3095 interface_registry_->Bind(std::move(interfaces), | 3095 interface_registry_->Bind(std::move(interfaces), |
3096 browser_info_.identity, browser_spec, | 3096 browser_info_.identity, browser_spec, |
3097 renderer_info_.identity, renderer_spec); | 3097 renderer_info_.identity, renderer_spec); |
3098 } | 3098 } |
3099 | 3099 |
3100 #if defined(USE_EXTERNAL_POPUP_MENU) | 3100 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) |
3101 #if defined(OS_MACOSX) | 3101 #if defined(OS_MACOSX) |
3102 | 3102 |
3103 void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) { | 3103 void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) { |
3104 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, selected_index)); | 3104 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, selected_index)); |
3105 } | 3105 } |
3106 | 3106 |
3107 void RenderFrameHostImpl::DidCancelPopupMenu() { | 3107 void RenderFrameHostImpl::DidCancelPopupMenu() { |
3108 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, -1)); | 3108 Send(new FrameMsg_SelectPopupMenuItem(routing_id_, -1)); |
3109 } | 3109 } |
3110 | 3110 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3498 GetUserData(kRenderFrameHostAndroidKey)); | 3498 GetUserData(kRenderFrameHostAndroidKey)); |
3499 if (!render_frame_host_android) { | 3499 if (!render_frame_host_android) { |
3500 render_frame_host_android = new RenderFrameHostAndroid(this); | 3500 render_frame_host_android = new RenderFrameHostAndroid(this); |
3501 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); | 3501 SetUserData(kRenderFrameHostAndroidKey, render_frame_host_android); |
3502 } | 3502 } |
3503 return render_frame_host_android->GetJavaObject(); | 3503 return render_frame_host_android->GetJavaObject(); |
3504 } | 3504 } |
3505 #endif | 3505 #endif |
3506 | 3506 |
3507 } // namespace content | 3507 } // namespace content |
OLD | NEW |