| OLD | NEW |
| 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_navigator_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_navigator_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/frame_host/interstitial_page_impl.h" | 7 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 8 #include "content/browser/frame_host/navigation_controller_impl.h" | 8 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 9 #include "content/browser/frame_host/navigator_delegate.h" | 9 #include "content/browser/frame_host/navigator_delegate.h" |
| 10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const base::TimeTicks& navigation_start) { | 35 const base::TimeTicks& navigation_start) { |
| 36 // Do not proceed if the interstitial itself has been disabled. | 36 // Do not proceed if the interstitial itself has been disabled. |
| 37 if (!enabled_) | 37 if (!enabled_) |
| 38 return; | 38 return; |
| 39 | 39 |
| 40 // The interstitial page should only navigate once. | 40 // The interstitial page should only navigate once. |
| 41 DCHECK(!render_frame_host->navigation_handle()); | 41 DCHECK(!render_frame_host->navigation_handle()); |
| 42 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create( | 42 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create( |
| 43 url, redirect_chain, render_frame_host->frame_tree_node(), | 43 url, redirect_chain, render_frame_host->frame_tree_node(), |
| 44 false, /* is_renderer_initiated */ | 44 false, /* is_renderer_initiated */ |
| 45 false, /* is_synchronous */ | 45 false, /* is_same_document */ |
| 46 navigation_start, /* navigation_state */ | 46 navigation_start, /* navigation_state */ |
| 47 0, /* pending_nav_entry_id */ | 47 0, /* pending_nav_entry_id */ |
| 48 false, /* started_in_context_menu */ | 48 false, /* started_in_context_menu */ |
| 49 CSPDisposition::CHECK, /* should_check_main_world_csp */ | 49 CSPDisposition::CHECK, /* should_check_main_world_csp */ |
| 50 false /* is_form_submission */ | 50 false /* is_form_submission */ |
| 51 )); | 51 )); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void InterstitialPageNavigatorImpl::DidNavigate( | 54 void InterstitialPageNavigatorImpl::DidNavigate( |
| 55 RenderFrameHostImpl* render_frame_host, | 55 RenderFrameHostImpl* render_frame_host, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void InterstitialPageNavigatorImpl::Disable() { | 73 void InterstitialPageNavigatorImpl::Disable() { |
| 74 enabled_ = false; | 74 enabled_ = false; |
| 75 | 75 |
| 76 // This is no longer safe to access. | 76 // This is no longer safe to access. |
| 77 controller_ = nullptr; | 77 controller_ = nullptr; |
| 78 } | 78 } |
| 79 | 79 |
| 80 } // namespace content | 80 } // namespace content |
| OLD | NEW |