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

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

Issue 135723003: Move DidCommitProvisionalLoad code from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some clean up, ready to start reviewing. Created 6 years, 10 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/interstitial_page_impl.h" 5 #include "content/browser/frame_host/interstitial_page_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 15 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
16 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 16 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
17 #include "content/browser/frame_host/interstitial_page_navigator_impl.h" 17 #include "content/browser/frame_host/interstitial_page_navigator_impl.h"
18 #include "content/browser/frame_host/navigation_controller_impl.h" 18 #include "content/browser/frame_host/navigation_controller_impl.h"
19 #include "content/browser/frame_host/navigation_entry_impl.h" 19 #include "content/browser/frame_host/navigation_entry_impl.h"
20 #include "content/browser/loader/resource_dispatcher_host_impl.h" 20 #include "content/browser/loader/resource_dispatcher_host_impl.h"
21 #include "content/browser/renderer_host/render_process_host_impl.h" 21 #include "content/browser/renderer_host/render_process_host_impl.h"
22 #include "content/browser/renderer_host/render_view_host_factory.h" 22 #include "content/browser/renderer_host/render_view_host_factory.h"
23 #include "content/browser/renderer_host/render_view_host_impl.h" 23 #include "content/browser/renderer_host/render_view_host_impl.h"
24 #include "content/browser/site_instance_impl.h" 24 #include "content/browser/site_instance_impl.h"
25 #include "content/browser/web_contents/web_contents_impl.h" 25 #include "content/browser/web_contents/web_contents_impl.h"
26 #include "content/common/frame_messages.h"
26 #include "content/common/view_messages.h" 27 #include "content/common/view_messages.h"
27 #include "content/port/browser/render_view_host_delegate_view.h" 28 #include "content/port/browser/render_view_host_delegate_view.h"
28 #include "content/port/browser/render_widget_host_view_port.h" 29 #include "content/port/browser/render_widget_host_view_port.h"
29 #include "content/port/browser/web_contents_view_port.h" 30 #include "content/port/browser/web_contents_view_port.h"
30 #include "content/public/browser/browser_context.h" 31 #include "content/public/browser/browser_context.h"
31 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
32 #include "content/public/browser/content_browser_client.h" 33 #include "content/public/browser/content_browser_client.h"
33 #include "content/public/browser/dom_operation_notification_details.h" 34 #include "content/public/browser/dom_operation_notification_details.h"
34 #include "content/public/browser/interstitial_page_delegate.h" 35 #include "content/public/browser/interstitial_page_delegate.h"
35 #include "content/public/browser/invalidate_type.h" 36 #include "content/public/browser/invalidate_type.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // Our renderer died. This should not happen in normal cases. 390 // Our renderer died. This should not happen in normal cases.
390 // If we haven't already started shutdown, just dismiss the interstitial. 391 // If we haven't already started shutdown, just dismiss the interstitial.
391 // We cannot check for enabled() here, because we may have called Disable 392 // We cannot check for enabled() here, because we may have called Disable
392 // without calling Hide. 393 // without calling Hide.
393 if (render_view_host_) 394 if (render_view_host_)
394 DontProceed(); 395 DontProceed();
395 } 396 }
396 397
397 void InterstitialPageImpl::DidNavigate( 398 void InterstitialPageImpl::DidNavigate(
398 RenderViewHost* render_view_host, 399 RenderViewHost* render_view_host,
399 const ViewHostMsg_FrameNavigate_Params& params) { 400 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {
400 // A fast user could have navigated away from the page that triggered the 401 // A fast user could have navigated away from the page that triggered the
401 // interstitial while the interstitial was loading, that would have disabled 402 // interstitial while the interstitial was loading, that would have disabled
402 // us. In that case we can dismiss ourselves. 403 // us. In that case we can dismiss ourselves.
403 if (!enabled()) { 404 if (!enabled()) {
404 DontProceed(); 405 DontProceed();
405 return; 406 return;
406 } 407 }
407 if (PageTransitionCoreTypeIs(params.transition, 408 if (PageTransitionCoreTypeIs(params.transition,
408 PAGE_TRANSITION_AUTO_SUBFRAME)) { 409 PAGE_TRANSITION_AUTO_SUBFRAME)) {
409 // No need to handle navigate message from iframe in the interstitial page. 410 // No need to handle navigate message from iframe in the interstitial page.
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 853
853 web_contents->GetDelegateView()->TakeFocus(reverse); 854 web_contents->GetDelegateView()->TakeFocus(reverse);
854 } 855 }
855 856
856 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( 857 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply(
857 int request_id, int number_of_matches, const gfx::Rect& selection_rect, 858 int request_id, int number_of_matches, const gfx::Rect& selection_rect,
858 int active_match_ordinal, bool final_update) { 859 int active_match_ordinal, bool final_update) {
859 } 860 }
860 861
861 } // namespace content 862 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698