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

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: yep 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame, 269 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartProvisionalLoadForFrame,
270 OnDidStartProvisionalLoadForFrame) 270 OnDidStartProvisionalLoadForFrame)
271 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError, 271 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailProvisionalLoadWithError,
272 OnDidFailProvisionalLoadWithError) 272 OnDidFailProvisionalLoadWithError)
273 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRedirectProvisionalLoad, 273 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRedirectProvisionalLoad,
274 OnDidRedirectProvisionalLoad) 274 OnDidRedirectProvisionalLoad)
275 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailLoadWithError, 275 IPC_MESSAGE_HANDLER(FrameHostMsg_DidFailLoadWithError,
276 OnDidFailLoadWithError) 276 OnDidFailLoadWithError)
277 IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad, 277 IPC_MESSAGE_HANDLER_GENERIC(FrameHostMsg_DidCommitProvisionalLoad,
278 OnNavigate(msg)) 278 OnNavigate(msg))
279 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading)
280 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading)
281 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL) 279 IPC_MESSAGE_HANDLER(FrameHostMsg_OpenURL, OnOpenURL)
282 IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted, 280 IPC_MESSAGE_HANDLER(FrameHostMsg_DocumentOnLoadCompleted,
283 OnDocumentOnLoadCompleted) 281 OnDocumentOnLoadCompleted)
284 IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK) 282 IPC_MESSAGE_HANDLER(FrameHostMsg_BeforeUnload_ACK, OnBeforeUnloadACK)
285 IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK) 283 IPC_MESSAGE_HANDLER(FrameHostMsg_SwapOut_ACK, OnSwapOutACK)
286 IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu) 284 IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu)
287 IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse, 285 IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse,
288 OnJavaScriptExecuteResponse) 286 OnJavaScriptExecuteResponse)
289 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 287 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
290 OnRunJavaScriptMessage) 288 OnRunJavaScriptMessage)
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 if (render_view_host_->IsRenderViewLive()) 509 if (render_view_host_->IsRenderViewLive())
512 Send(new FrameMsg_SwapOut(routing_id_)); 510 Send(new FrameMsg_SwapOut(routing_id_));
513 511
514 if (!GetParent()) 512 if (!GetParent())
515 delegate_->SwappedOut(this); 513 delegate_->SwappedOut(this);
516 514
517 // Allow the navigation to proceed. 515 // Allow the navigation to proceed.
518 frame_tree_node_->render_manager()->SwappedOut(this); 516 frame_tree_node_->render_manager()->SwappedOut(this);
519 } 517 }
520 518
521 void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) {
522 delegate_->DidStartLoading(this, to_different_document);
523 }
524
525 void RenderFrameHostImpl::OnDidStopLoading() {
526 delegate_->DidStopLoading(this);
527 }
528
529 void RenderFrameHostImpl::OnBeforeUnloadACK( 519 void RenderFrameHostImpl::OnBeforeUnloadACK(
530 bool proceed, 520 bool proceed,
531 const base::TimeTicks& renderer_before_unload_start_time, 521 const base::TimeTicks& renderer_before_unload_start_time,
532 const base::TimeTicks& renderer_before_unload_end_time) { 522 const base::TimeTicks& renderer_before_unload_end_time) {
533 // TODO(creis): Support properly beforeunload on subframes. For now just 523 // TODO(creis): Support properly beforeunload on subframes. For now just
534 // pretend that the handler ran and allowed the navigation to proceed. 524 // pretend that the handler ran and allowed the navigation to proceed.
535 if (GetParent()) { 525 if (GetParent()) {
536 render_view_host_->is_waiting_for_beforeunload_ack_ = false; 526 render_view_host_->is_waiting_for_beforeunload_ack_ = false;
537 frame_tree_node_->render_manager()->OnBeforeUnloadACK( 527 frame_tree_node_->render_manager()->OnBeforeUnloadACK(
538 render_view_host_->unload_ack_is_for_cross_site_transition_, proceed, 528 render_view_host_->unload_ack_is_for_cross_site_transition_, proceed,
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 cancel_notification_callbacks_.erase(notification_id); 846 cancel_notification_callbacks_.erase(notification_id);
857 } 847 }
858 848
859 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone( 849 void RenderFrameHostImpl::DesktopNotificationPermissionRequestDone(
860 int callback_context) { 850 int callback_context) {
861 Send(new DesktopNotificationMsg_PermissionRequestDone( 851 Send(new DesktopNotificationMsg_PermissionRequestDone(
862 routing_id_, callback_context)); 852 routing_id_, callback_context));
863 } 853 }
864 854
865 } // namespace content 855 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698