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

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
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 frame_tree_node_->StopLoading();
2274 }
2275 #endif
2276
2267 void RenderFrameHostImpl::OnShowCreatedWindow(int pending_widget_routing_id, 2277 void RenderFrameHostImpl::OnShowCreatedWindow(int pending_widget_routing_id,
2268 WindowOpenDisposition disposition, 2278 WindowOpenDisposition disposition,
2269 const gfx::Rect& initial_rect, 2279 const gfx::Rect& initial_rect,
2270 bool user_gesture) { 2280 bool user_gesture) {
2271 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id, 2281 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id,
2272 disposition, initial_rect, user_gesture); 2282 disposition, initial_rect, user_gesture);
2273 } 2283 }
2274 2284
2275 void RenderFrameHostImpl::RegisterMojoInterfaces() { 2285 void RenderFrameHostImpl::RegisterMojoInterfaces() {
2276 device::GeolocationServiceContext* geolocation_service_context = 2286 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 3466 // 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 3467 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3458 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3468 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3459 return NavigationHandleImpl::Create( 3469 return NavigationHandleImpl::Create(
3460 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3470 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3461 params.was_within_same_page, base::TimeTicks::Now(), 3471 params.was_within_same_page, base::TimeTicks::Now(),
3462 entry_id_for_data_nav, false); // started_from_context_menu 3472 entry_id_for_data_nav, false); // started_from_context_menu
3463 } 3473 }
3464 3474
3465 } // namespace content 3475 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698