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_impl.h" | 5 #include "content/browser/frame_host/interstitial_page_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 SiteInstance* instance) { | 804 SiteInstance* instance) { |
805 return session_storage_namespace_.get(); | 805 return session_storage_namespace_.get(); |
806 } | 806 } |
807 | 807 |
808 FrameTree* InterstitialPageImpl::GetFrameTree() { | 808 FrameTree* InterstitialPageImpl::GetFrameTree() { |
809 return frame_tree_.get(); | 809 return frame_tree_.get(); |
810 } | 810 } |
811 | 811 |
812 void InterstitialPageImpl::Disable() { | 812 void InterstitialPageImpl::Disable() { |
813 enabled_ = false; | 813 enabled_ = false; |
| 814 |
| 815 // Also let the InterstitialPageNavigatorImpl know. |
| 816 static_cast<InterstitialPageNavigatorImpl*>(frame_tree_->root()->navigator()) |
| 817 ->Disable(); |
814 } | 818 } |
815 | 819 |
816 void InterstitialPageImpl::Shutdown() { | 820 void InterstitialPageImpl::Shutdown() { |
817 delete this; | 821 delete this; |
818 } | 822 } |
819 | 823 |
820 void InterstitialPageImpl::OnNavigatingAwayOrTabClosing() { | 824 void InterstitialPageImpl::OnNavigatingAwayOrTabClosing() { |
821 if (action_taken_ == NO_ACTION) { | 825 if (action_taken_ == NO_ACTION) { |
822 // We are navigating away from the interstitial or closing a tab with an | 826 // We are navigating away from the interstitial or closing a tab with an |
823 // interstitial. Default to DontProceed(). We don't just call Hide as | 827 // interstitial. Default to DontProceed(). We don't just call Hide as |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { | 996 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { |
993 WebContentsImpl* web_contents_impl = | 997 WebContentsImpl* web_contents_impl = |
994 static_cast<WebContentsImpl*>(web_contents_); | 998 static_cast<WebContentsImpl*>(web_contents_); |
995 if (!web_contents_impl) | 999 if (!web_contents_impl) |
996 return nullptr; | 1000 return nullptr; |
997 | 1001 |
998 return web_contents_impl->GetInputEventRouter(); | 1002 return web_contents_impl->GetInputEventRouter(); |
999 } | 1003 } |
1000 | 1004 |
1001 } // namespace content | 1005 } // namespace content |
OLD | NEW |