| 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 SiteInstance* instance) { | 800 SiteInstance* instance) { |
| 801 return session_storage_namespace_.get(); | 801 return session_storage_namespace_.get(); |
| 802 } | 802 } |
| 803 | 803 |
| 804 FrameTree* InterstitialPageImpl::GetFrameTree() { | 804 FrameTree* InterstitialPageImpl::GetFrameTree() { |
| 805 return frame_tree_.get(); | 805 return frame_tree_.get(); |
| 806 } | 806 } |
| 807 | 807 |
| 808 void InterstitialPageImpl::Disable() { | 808 void InterstitialPageImpl::Disable() { |
| 809 enabled_ = false; | 809 enabled_ = false; |
| 810 |
| 811 // Also let the InterstitialPageNavigatorImpl know. |
| 812 static_cast<InterstitialPageNavigatorImpl*>(frame_tree_->root()->navigator()) |
| 813 ->Disable(); |
| 810 } | 814 } |
| 811 | 815 |
| 812 void InterstitialPageImpl::Shutdown() { | 816 void InterstitialPageImpl::Shutdown() { |
| 813 delete this; | 817 delete this; |
| 814 } | 818 } |
| 815 | 819 |
| 816 void InterstitialPageImpl::OnNavigatingAwayOrTabClosing() { | 820 void InterstitialPageImpl::OnNavigatingAwayOrTabClosing() { |
| 817 if (action_taken_ == NO_ACTION) { | 821 if (action_taken_ == NO_ACTION) { |
| 818 // We are navigating away from the interstitial or closing a tab with an | 822 // We are navigating away from the interstitial or closing a tab with an |
| 819 // interstitial. Default to DontProceed(). We don't just call Hide as | 823 // interstitial. Default to DontProceed(). We don't just call Hide as |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { | 992 RenderWidgetHostInputEventRouter* InterstitialPageImpl::GetInputEventRouter() { |
| 989 WebContentsImpl* web_contents_impl = | 993 WebContentsImpl* web_contents_impl = |
| 990 static_cast<WebContentsImpl*>(web_contents_); | 994 static_cast<WebContentsImpl*>(web_contents_); |
| 991 if (!web_contents_impl) | 995 if (!web_contents_impl) |
| 992 return nullptr; | 996 return nullptr; |
| 993 | 997 |
| 994 return web_contents_impl->GetInputEventRouter(); | 998 return web_contents_impl->GetInputEventRouter(); |
| 995 } | 999 } |
| 996 | 1000 |
| 997 } // namespace content | 1001 } // namespace content |
| OLD | NEW |