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

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

Issue 263973003: Move LoadProgressTracker to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: recomment Created 6 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 | Annotate | Revision Log
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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame, 283 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame,
284 OnDidStartProvisionalLoadForFrame) 284 OnDidStartProvisionalLoadForFrame)
285 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError, 285 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError,
286 OnDidFailProvisionalLoadWithError) 286 OnDidFailProvisionalLoadWithError)
287 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRedirectProvisionalLoad, 287 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRedirectProvisionalLoad,
288 OnDidRedirectProvisionalLoad) 288 OnDidRedirectProvisionalLoad)
289 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailLoadWithError, 289 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailLoadWithError,
290 OnDidFailLoadWithError) 290 OnDidFailLoadWithError)
291 IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad, 291 IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad,
292 OnNavigate(msg)) 292 OnNavigate(msg))
293 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading)
294 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading)
295 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) 293 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
296 IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted, 294 IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted,
297 OnDocumentOnLoadCompleted) 295 OnDocumentOnLoadCompleted)
298 IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK) 296 IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK)
299 IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK) 297 IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK)
300 IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu) 298 IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu)
301 IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse, 299 IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse,
302 OnJavaScriptExecuteResponse) 300 OnJavaScriptExecuteResponse)
303 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 301 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
304 OnRunJavaScriptMessage) 302 OnRunJavaScriptMessage)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 if (render_view_host_->IsRenderViewLive()) 517 if (render_view_host_->IsRenderViewLive())
520 Send(new FrameMsg_SwapOut(routing_id_)); 518 Send(new FrameMsg_SwapOut(routing_id_));
521 519
522 if (!GetParent()) 520 if (!GetParent())
523 delegate_->SwappedOut(this); 521 delegate_->SwappedOut(this);
524 522
525 // Allow the navigation to proceed. 523 // Allow the navigation to proceed.
526 frame_tree_node_->render_manager()->SwappedOut(this); 524 frame_tree_node_->render_manager()->SwappedOut(this);
527 } 525 }
528 526
529 void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) {
530 delegate_->DidStartLoading(this, to_different_document);
531 }
532
533 void RenderFrameHostImpl::OnDidStopLoading() {
534 delegate_->DidStopLoading(this);
535 }
536
537 void RenderFrameHostImpl::OnBeforeUnloadACK( 527 void RenderFrameHostImpl::OnBeforeUnloadACK(
538 bool proceed, 528 bool proceed,
539 const base::TimeTicks& renderer_before_unload_start_time, 529 const base::TimeTicks& renderer_before_unload_start_time,
540 const base::TimeTicks& renderer_before_unload_end_time) { 530 const base::TimeTicks& renderer_before_unload_end_time) {
541 // TODO(creis): Support properly beforeunload on subframes. For now just 531 // TODO(creis): Support properly beforeunload on subframes. For now just
542 // pretend that the handler ran and allowed the navigation to proceed. 532 // pretend that the handler ran and allowed the navigation to proceed.
543 if (GetParent()) { 533 if (GetParent()) {
544 render_view_host_->is_waiting_for_beforeunload_ack_ = false; 534 render_view_host_->is_waiting_for_beforeunload_ack_ = false;
545 frame_tree_node_->render_manager()->OnBeforeUnloadACK( 535 frame_tree_node_->render_manager()->OnBeforeUnloadACK(
546 render_view_host_->unload_ack_is_for_cross_site_transition_, proceed, 536 render_view_host_->unload_ack_is_for_cross_site_transition_, proceed,
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 cancel_notification_callbacks_.erase(notification_id); 876 cancel_notification_callbacks_.erase(notification_id);
887 } 877 }
888 878
889 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone( 879 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone(
890 int callback_context) { 880 int callback_context) {
891 Send(new DesktopNotificationMsg_PermissionRequestDone( 881 Send(new DesktopNotificationMsg_PermissionRequestDone(
892 routing_id_, callback_context)); 882 routing_id_, callback_context));
893 } 883 }
894 884
895 } // namespace content 885 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698