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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2625773002: Reenable framebusting (Closed)
Patch Set: Fix unit tests Created 3 years, 11 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 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 OnAccessibilitySnapshotResponse) 750 OnAccessibilitySnapshotResponse)
751 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen) 751 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen)
752 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) 752 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading)
753 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) 753 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading)
754 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, 754 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress,
755 OnDidChangeLoadProgress) 755 OnDidChangeLoadProgress)
756 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, 756 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse,
757 OnSerializeAsMHTMLResponse) 757 OnSerializeAsMHTMLResponse)
758 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) 758 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged)
759 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 759 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
760 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture,
761 OnSetHasReceivedUserGesture)
760 #if defined(USE_EXTERNAL_POPUP_MENU) 762 #if defined(USE_EXTERNAL_POPUP_MENU)
761 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) 763 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
762 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) 764 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
763 #endif 765 #endif
764 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) 766 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
765 IPC_END_MESSAGE_MAP() 767 IPC_END_MESSAGE_MAP()
766 768
767 // No further actions here, since we may have been deleted. 769 // No further actions here, since we may have been deleted.
768 return handled; 770 return handled;
769 } 771 }
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 return; 2188 return;
2187 2189
2188 has_focused_editable_element_ = is_editable_element; 2190 has_focused_editable_element_ = is_editable_element;
2189 // First convert the bounds to root view. 2191 // First convert the bounds to root view.
2190 delegate_->OnFocusedElementChangedInFrame( 2192 delegate_->OnFocusedElementChangedInFrame(
2191 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( 2193 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace(
2192 bounds_in_frame_widget.origin()), 2194 bounds_in_frame_widget.origin()),
2193 bounds_in_frame_widget.size())); 2195 bounds_in_frame_widget.size()));
2194 } 2196 }
2195 2197
2198 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() {
2199 frame_tree_node_->render_manager()->OnSetHasReceivedUserGesture();
2200 }
2201
2196 #if defined(USE_EXTERNAL_POPUP_MENU) 2202 #if defined(USE_EXTERNAL_POPUP_MENU)
2197 void RenderFrameHostImpl::OnShowPopup( 2203 void RenderFrameHostImpl::OnShowPopup(
2198 const FrameHostMsg_ShowPopup_Params& params) { 2204 const FrameHostMsg_ShowPopup_Params& params) {
2199 RenderViewHostDelegateView* view = 2205 RenderViewHostDelegateView* view =
2200 render_view_host_->delegate_->GetDelegateView(); 2206 render_view_host_->delegate_->GetDelegateView();
2201 if (view) { 2207 if (view) {
2202 gfx::Point original_point(params.bounds.x(), params.bounds.y()); 2208 gfx::Point original_point(params.bounds.x(), params.bounds.y());
2203 gfx::Point transformed_point = 2209 gfx::Point transformed_point =
2204 static_cast<RenderWidgetHostViewBase*>(GetView()) 2210 static_cast<RenderWidgetHostViewBase*>(GetView())
2205 ->TransformPointToRootCoordSpace(original_point); 2211 ->TransformPointToRootCoordSpace(original_point);
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3384 // There is no pending NavigationEntry in these cases, so pass 0 as the 3390 // There is no pending NavigationEntry in these cases, so pass 0 as the
3385 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3391 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3386 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3392 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3387 return NavigationHandleImpl::Create( 3393 return NavigationHandleImpl::Create(
3388 params.url, frame_tree_node_, is_renderer_initiated, 3394 params.url, frame_tree_node_, is_renderer_initiated,
3389 params.was_within_same_page, base::TimeTicks::Now(), 3395 params.was_within_same_page, base::TimeTicks::Now(),
3390 entry_id_for_data_nav, false); // started_from_context_menu 3396 entry_id_for_data_nav, false); // started_from_context_menu
3391 } 3397 }
3392 3398
3393 } // namespace content 3399 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698