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

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

Issue 2830753004: Pipe the devTools FrameId from blink into the browser for headless (Closed)
Patch Set: Rebased Created 3 years, 7 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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) 806 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading)
807 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) 807 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading)
808 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, 808 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress,
809 OnDidChangeLoadProgress) 809 OnDidChangeLoadProgress)
810 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, 810 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse,
811 OnSerializeAsMHTMLResponse) 811 OnSerializeAsMHTMLResponse)
812 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) 812 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged)
813 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 813 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
814 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, 814 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture,
815 OnSetHasReceivedUserGesture) 815 OnSetHasReceivedUserGesture)
816 IPC_MESSAGE_HANDLER(FrameHostMsg_SetDevToolsFrameId, OnSetDevToolsFrameId)
816 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 817 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
817 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) 818 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
818 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) 819 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
819 #endif 820 #endif
820 #if defined(OS_ANDROID) 821 #if defined(OS_ANDROID)
821 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder, 822 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder,
822 OnNavigationHandledByEmbedder) 823 OnNavigationHandledByEmbedder)
823 #endif 824 #endif
824 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) 825 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
825 IPC_END_MESSAGE_MAP() 826 IPC_END_MESSAGE_MAP()
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 delegate_->OnFocusedElementChangedInFrame( 2388 delegate_->OnFocusedElementChangedInFrame(
2388 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( 2389 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace(
2389 bounds_in_frame_widget.origin()), 2390 bounds_in_frame_widget.origin()),
2390 bounds_in_frame_widget.size())); 2391 bounds_in_frame_widget.size()));
2391 } 2392 }
2392 2393
2393 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { 2394 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() {
2394 frame_tree_node_->OnSetHasReceivedUserGesture(); 2395 frame_tree_node_->OnSetHasReceivedUserGesture();
2395 } 2396 }
2396 2397
2398 void RenderFrameHostImpl::OnSetDevToolsFrameId(
2399 const std::string& devtools_frame_id) {
2400 untrusted_devtools_frame_id_ = devtools_frame_id;
2401 }
2402
2397 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 2403 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
2398 void RenderFrameHostImpl::OnShowPopup( 2404 void RenderFrameHostImpl::OnShowPopup(
2399 const FrameHostMsg_ShowPopup_Params& params) { 2405 const FrameHostMsg_ShowPopup_Params& params) {
2400 RenderViewHostDelegateView* view = 2406 RenderViewHostDelegateView* view =
2401 render_view_host_->delegate_->GetDelegateView(); 2407 render_view_host_->delegate_->GetDelegateView();
2402 if (view) { 2408 if (view) {
2403 gfx::Point original_point(params.bounds.x(), params.bounds.y()); 2409 gfx::Point original_point(params.bounds.x(), params.bounds.y());
2404 gfx::Point transformed_point = 2410 gfx::Point transformed_point =
2405 static_cast<RenderWidgetHostViewBase*>(GetView()) 2411 static_cast<RenderWidgetHostViewBase*>(GetView())
2406 ->TransformPointToRootCoordSpace(original_point); 2412 ->TransformPointToRootCoordSpace(original_point);
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
3792 } 3798 }
3793 3799
3794 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3800 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3795 const std::string& interface_name, 3801 const std::string& interface_name,
3796 mojo::ScopedMessagePipeHandle pipe) { 3802 mojo::ScopedMessagePipeHandle pipe) {
3797 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3803 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3798 } 3804 }
3799 #endif 3805 #endif
3800 3806
3801 } // namespace content 3807 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698