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

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

Issue 367653002: Add a FrameHostMsg_BeginNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Przemek's comments + fixed compilation error Created 6 years, 5 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/metrics/user_metrics_action.h" 10 #include "base/metrics/user_metrics_action.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 OnJavaScriptExecuteResponse) 328 OnJavaScriptExecuteResponse)
329 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 329 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
330 OnRunJavaScriptMessage) 330 OnRunJavaScriptMessage)
331 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, 331 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm,
332 OnRunBeforeUnloadConfirm) 332 OnRunBeforeUnloadConfirm)
333 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, 333 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
334 OnDidAccessInitialDocument) 334 OnDidAccessInitialDocument)
335 IPC_MESSAGE_HANDLER(FrameHostMsg_DidDisownOpener, OnDidDisownOpener) 335 IPC_MESSAGE_HANDLER(FrameHostMsg_DidDisownOpener, OnDidDisownOpener)
336 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) 336 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
337 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) 337 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding)
338 IPC_MESSAGE_HANDLER(FrameHostMsg_BeginNavigation,
339 OnBeginNavigation)
338 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, 340 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
339 OnRequestDesktopNotificationPermission) 341 OnRequestDesktopNotificationPermission)
340 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, 342 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
341 OnShowDesktopNotification) 343 OnShowDesktopNotification)
342 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 344 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
343 OnCancelDesktopNotification) 345 OnCancelDesktopNotification)
344 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse, 346 IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse,
345 OnTextSurroundingSelectionResponse) 347 OnTextSurroundingSelectionResponse)
346 IPC_END_MESSAGE_MAP() 348 IPC_END_MESSAGE_MAP()
347 349
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 WebTextDirectionToChromeTextDirection( 764 WebTextDirectionToChromeTextDirection(
763 title_direction)); 765 title_direction));
764 } 766 }
765 767
766 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) { 768 void RenderFrameHostImpl::OnUpdateEncoding(const std::string& encoding_name) {
767 // This message is only sent for top-level frames. TODO(avi): when frame tree 769 // This message is only sent for top-level frames. TODO(avi): when frame tree
768 // mirroring works correctly, add a check here to enforce it. 770 // mirroring works correctly, add a check here to enforce it.
769 delegate_->UpdateEncoding(this, encoding_name); 771 delegate_->UpdateEncoding(this, encoding_name);
770 } 772 }
771 773
774 void RenderFrameHostImpl::OnBeginNavigation(
775 const FrameHostMsg_BeginNavigation_Params& params) {
davidben 2014/07/09 15:14:28 Should we guard at this point behind a switch or s
clamy 2014/07/15 15:32:14 Good point. I put it behind a compile flag.
776 frame_tree_node()->render_manager()->BeginNavigation(params);
777 }
778
772 void RenderFrameHostImpl::SetPendingShutdown(const base::Closure& on_swap_out) { 779 void RenderFrameHostImpl::SetPendingShutdown(const base::Closure& on_swap_out) {
773 render_view_host_->SetPendingShutdown(on_swap_out); 780 render_view_host_->SetPendingShutdown(on_swap_out);
774 } 781 }
775 782
776 bool RenderFrameHostImpl::CanCommitURL(const GURL& url) { 783 bool RenderFrameHostImpl::CanCommitURL(const GURL& url) {
777 // TODO(creis): We should also check for WebUI pages here. Also, when the 784 // TODO(creis): We should also check for WebUI pages here. Also, when the
778 // out-of-process iframes implementation is ready, we should check for 785 // out-of-process iframes implementation is ready, we should check for
779 // cross-site URLs that are not allowed to commit in this process. 786 // cross-site URLs that are not allowed to commit in this process.
780 787
781 // Give the client a chance to disallow URLs from committing. 788 // Give the client a chance to disallow URLs from committing.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 FROM_HERE, 949 FROM_HERE,
943 base::Bind( 950 base::Bind(
944 &TransitionRequestManager::SetHasPendingTransitionRequest, 951 &TransitionRequestManager::SetHasPendingTransitionRequest,
945 base::Unretained(TransitionRequestManager::GetInstance()), 952 base::Unretained(TransitionRequestManager::GetInstance()),
946 GetProcess()->GetID(), 953 GetProcess()->GetID(),
947 routing_id_, 954 routing_id_,
948 has_pending_request)); 955 has_pending_request));
949 } 956 }
950 957
951 } // namespace content 958 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698