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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 OnAccessibilitySnapshotResponse) | 753 OnAccessibilitySnapshotResponse) |
754 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen) | 754 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen) |
755 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) | 755 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) |
756 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) | 756 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) |
757 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, | 757 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, |
758 OnDidChangeLoadProgress) | 758 OnDidChangeLoadProgress) |
759 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, | 759 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, |
760 OnSerializeAsMHTMLResponse) | 760 OnSerializeAsMHTMLResponse) |
761 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) | 761 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) |
762 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) | 762 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) |
| 763 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, |
| 764 OnSetHasReceivedUserGesture) |
763 #if defined(USE_EXTERNAL_POPUP_MENU) | 765 #if defined(USE_EXTERNAL_POPUP_MENU) |
764 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) | 766 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) |
765 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) | 767 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) |
766 #endif | 768 #endif |
767 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) | 769 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) |
768 IPC_END_MESSAGE_MAP() | 770 IPC_END_MESSAGE_MAP() |
769 | 771 |
770 // No further actions here, since we may have been deleted. | 772 // No further actions here, since we may have been deleted. |
771 return handled; | 773 return handled; |
772 } | 774 } |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2192 return; | 2194 return; |
2193 | 2195 |
2194 has_focused_editable_element_ = is_editable_element; | 2196 has_focused_editable_element_ = is_editable_element; |
2195 // First convert the bounds to root view. | 2197 // First convert the bounds to root view. |
2196 delegate_->OnFocusedElementChangedInFrame( | 2198 delegate_->OnFocusedElementChangedInFrame( |
2197 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( | 2199 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( |
2198 bounds_in_frame_widget.origin()), | 2200 bounds_in_frame_widget.origin()), |
2199 bounds_in_frame_widget.size())); | 2201 bounds_in_frame_widget.size())); |
2200 } | 2202 } |
2201 | 2203 |
| 2204 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { |
| 2205 frame_tree_node_->OnSetHasReceivedUserGesture(); |
| 2206 } |
| 2207 |
2202 #if defined(USE_EXTERNAL_POPUP_MENU) | 2208 #if defined(USE_EXTERNAL_POPUP_MENU) |
2203 void RenderFrameHostImpl::OnShowPopup( | 2209 void RenderFrameHostImpl::OnShowPopup( |
2204 const FrameHostMsg_ShowPopup_Params& params) { | 2210 const FrameHostMsg_ShowPopup_Params& params) { |
2205 RenderViewHostDelegateView* view = | 2211 RenderViewHostDelegateView* view = |
2206 render_view_host_->delegate_->GetDelegateView(); | 2212 render_view_host_->delegate_->GetDelegateView(); |
2207 if (view) { | 2213 if (view) { |
2208 gfx::Point original_point(params.bounds.x(), params.bounds.y()); | 2214 gfx::Point original_point(params.bounds.x(), params.bounds.y()); |
2209 gfx::Point transformed_point = | 2215 gfx::Point transformed_point = |
2210 static_cast<RenderWidgetHostViewBase*>(GetView()) | 2216 static_cast<RenderWidgetHostViewBase*>(GetView()) |
2211 ->TransformPointToRootCoordSpace(original_point); | 2217 ->TransformPointToRootCoordSpace(original_point); |
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3395 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3401 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3396 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3402 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3397 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3403 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3398 return NavigationHandleImpl::Create( | 3404 return NavigationHandleImpl::Create( |
3399 params.url, frame_tree_node_, is_renderer_initiated, | 3405 params.url, frame_tree_node_, is_renderer_initiated, |
3400 params.was_within_same_page, base::TimeTicks::Now(), | 3406 params.was_within_same_page, base::TimeTicks::Now(), |
3401 entry_id_for_data_nav, false); // started_from_context_menu | 3407 entry_id_for_data_nav, false); // started_from_context_menu |
3402 } | 3408 } |
3403 | 3409 |
3404 } // namespace content | 3410 } // namespace content |
OLD | NEW |