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

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

Issue 2745653011: Fix the browser not being notified when a webview embedder handles a navigation. (Closed)
Patch Set: without PlzNavigate Created 3 years, 9 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, 748 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse,
749 OnSerializeAsMHTMLResponse) 749 OnSerializeAsMHTMLResponse)
750 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) 750 IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged)
751 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 751 IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
752 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, 752 IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture,
753 OnSetHasReceivedUserGesture) 753 OnSetHasReceivedUserGesture)
754 #if defined(USE_EXTERNAL_POPUP_MENU) 754 #if defined(USE_EXTERNAL_POPUP_MENU)
755 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) 755 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
756 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) 756 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
757 #endif 757 #endif
758 #if defined(OS_ANDROID)
759 IPC_MESSAGE_HANDLER(FrameHostMsg_NavigationHandledByEmbedder,
760 OnNavigationHandledByEmbedder)
761 #endif
758 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow) 762 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowCreatedWindow, OnShowCreatedWindow)
759 IPC_END_MESSAGE_MAP() 763 IPC_END_MESSAGE_MAP()
760 764
761 // No further actions here, since we may have been deleted. 765 // No further actions here, since we may have been deleted.
762 return handled; 766 return handled;
763 } 767 }
764 768
765 void RenderFrameHostImpl::OnAssociatedInterfaceRequest( 769 void RenderFrameHostImpl::OnAssociatedInterfaceRequest(
766 const std::string& interface_name, 770 const std::string& interface_name,
767 mojo::ScopedInterfaceEndpointHandle handle) { 771 mojo::ScopedInterfaceEndpointHandle handle) {
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2257 } 2261 }
2258 2262
2259 void RenderFrameHostImpl::OnHidePopup() { 2263 void RenderFrameHostImpl::OnHidePopup() {
2260 RenderViewHostDelegateView* view = 2264 RenderViewHostDelegateView* view =
2261 render_view_host_->delegate_->GetDelegateView(); 2265 render_view_host_->delegate_->GetDelegateView();
2262 if (view) 2266 if (view)
2263 view->HidePopupMenu(); 2267 view->HidePopupMenu();
2264 } 2268 }
2265 #endif 2269 #endif
2266 2270
2271 #if defined(OS_ANDROID)
2272 void RenderFrameHostImpl::OnNavigationHandledByEmbedder() {
2273 if (navigation_handle_)
2274 navigation_handle_->set_net_error_code(net::ERR_ABORTED);
2275
2276 OnDidStopLoading();
2277 }
2278 #endif
2279
2267 void RenderFrameHostImpl::OnShowCreatedWindow(int pending_widget_routing_id, 2280 void RenderFrameHostImpl::OnShowCreatedWindow(int pending_widget_routing_id,
2268 WindowOpenDisposition disposition, 2281 WindowOpenDisposition disposition,
2269 const gfx::Rect& initial_rect, 2282 const gfx::Rect& initial_rect,
2270 bool user_gesture) { 2283 bool user_gesture) {
2271 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id, 2284 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id,
2272 disposition, initial_rect, user_gesture); 2285 disposition, initial_rect, user_gesture);
2273 } 2286 }
2274 2287
2275 void RenderFrameHostImpl::RegisterMojoInterfaces() { 2288 void RenderFrameHostImpl::RegisterMojoInterfaces() {
2276 device::GeolocationServiceContext* geolocation_service_context = 2289 device::GeolocationServiceContext* geolocation_service_context =
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
3456 // There is no pending NavigationEntry in these cases, so pass 0 as the 3469 // There is no pending NavigationEntry in these cases, so pass 0 as the
3457 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3470 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3471 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3459 return NavigationHandleImpl::Create( 3472 return NavigationHandleImpl::Create(
3460 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3473 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3461 params.was_within_same_page, base::TimeTicks::Now(), 3474 params.was_within_same_page, base::TimeTicks::Now(),
3462 entry_id_for_data_nav, false); // started_from_context_menu 3475 entry_id_for_data_nav, false); // started_from_context_menu
3463 } 3476 }
3464 3477
3465 } // namespace content 3478 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698