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

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: Add include for msvc Created 3 years, 8 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) 804 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading)
805 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) 805 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading)
806 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, 806 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress,
807 OnDidChangeLoadProgress) 807 OnDidChangeLoadProgress)
808 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, 808 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse,
809 OnSerializeAsMHTMLResponse) 809 OnSerializeAsMHTMLResponse)
810 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) 810 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged)
811 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 811 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
812 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, 812 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture,
813 OnSetHasReceivedUserGesture) 813 OnSetHasReceivedUserGesture)
814 IPC_MESSAGE_HANDLER(FrameHostMsg_SetDevToolsFrameId, OnSetDevToolsFrameId)
814 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 815 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
815 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) 816 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
816 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) 817 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
817 #endif 818 #endif
818 #if defined(OS_ANDROID) 819 #if defined(OS_ANDROID)
819 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder, 820 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder,
820 OnNavigationHandledByEmbedder) 821 OnNavigationHandledByEmbedder)
821 #endif 822 #endif
822 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) 823 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
823 IPC_END_MESSAGE_MAP() 824 IPC_END_MESSAGE_MAP()
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 delegate_->OnFocusedElementChangedInFrame( 2397 delegate_->OnFocusedElementChangedInFrame(
2397 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace( 2398 this, gfx::Rect(GetView()->TransformPointToRootCoordSpace(
2398 bounds_in_frame_widget.origin()), 2399 bounds_in_frame_widget.origin()),
2399 bounds_in_frame_widget.size())); 2400 bounds_in_frame_widget.size()));
2400 } 2401 }
2401 2402
2402 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { 2403 void RenderFrameHostImpl::OnSetHasReceivedUserGesture() {
2403 frame_tree_node_->OnSetHasReceivedUserGesture(); 2404 frame_tree_node_->OnSetHasReceivedUserGesture();
2404 } 2405 }
2405 2406
2407 void RenderFrameHostImpl::OnSetDevToolsFrameId(
2408 const std::string& devtools_frame_id) {
2409 devtools_frame_id_ = devtools_frame_id;
Charlie Reis 2017/04/24 20:26:42 I'm a bit uncomfortable having the browser process
2410 }
2411
2406 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 2412 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
2407 void RenderFrameHostImpl::OnShowPopup( 2413 void RenderFrameHostImpl::OnShowPopup(
2408 const FrameHostMsg_ShowPopup_Params& params) { 2414 const FrameHostMsg_ShowPopup_Params& params) {
2409 RenderViewHostDelegateView* view = 2415 RenderViewHostDelegateView* view =
2410 render_view_host_->delegate_->GetDelegateView(); 2416 render_view_host_->delegate_->GetDelegateView();
2411 if (view) { 2417 if (view) {
2412 gfx::Point original_point(params.bounds.x(), params.bounds.y()); 2418 gfx::Point original_point(params.bounds.x(), params.bounds.y());
2413 gfx::Point transformed_point = 2419 gfx::Point transformed_point =
2414 static_cast<RenderWidgetHostViewBase*>(GetView()) 2420 static_cast<RenderWidgetHostViewBase*>(GetView())
2415 ->TransformPointToRootCoordSpace(original_point); 2421 ->TransformPointToRootCoordSpace(original_point);
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 } 3675 }
3670 3676
3671 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3677 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3672 const std::string& interface_name, 3678 const std::string& interface_name,
3673 mojo::ScopedMessagePipeHandle pipe) { 3679 mojo::ScopedMessagePipeHandle pipe) {
3674 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3680 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3675 } 3681 }
3676 #endif 3682 #endif
3677 3683
3678 } // namespace content 3684 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698