| 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 <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" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 reload_on_dont_proceed_(false), | 154 reload_on_dont_proceed_(false), |
| 155 enabled_(true), | 155 enabled_(true), |
| 156 action_taken_(NO_ACTION), | 156 action_taken_(NO_ACTION), |
| 157 render_view_host_(NULL), | 157 render_view_host_(NULL), |
| 158 // TODO(nasko): The InterstitialPageImpl will need to provide its own | 158 // TODO(nasko): The InterstitialPageImpl will need to provide its own |
| 159 // NavigationControllerImpl to the Navigator, which is separate from | 159 // NavigationControllerImpl to the Navigator, which is separate from |
| 160 // the WebContents one, so we can enforce no navigation policy here. | 160 // the WebContents one, so we can enforce no navigation policy here. |
| 161 // While we get the code to a point to do this, pass NULL for it. | 161 // While we get the code to a point to do this, pass NULL for it. |
| 162 // TODO(creis): We will also need to pass delegates for the RVHM as we | 162 // TODO(creis): We will also need to pass delegates for the RVHM as we |
| 163 // start to use it. | 163 // start to use it. |
| 164 frame_tree_(new Navigator(NULL, this), NULL, NULL, NULL), | 164 frame_tree_(new Navigator(NULL, this), NULL, NULL, NULL, NULL), |
| 165 original_child_id_(web_contents->GetRenderProcessHost()->GetID()), | 165 original_child_id_(web_contents->GetRenderProcessHost()->GetID()), |
| 166 original_rvh_id_(web_contents->GetRenderViewHost()->GetRoutingID()), | 166 original_rvh_id_(web_contents->GetRenderViewHost()->GetRoutingID()), |
| 167 should_revert_web_contents_title_(false), | 167 should_revert_web_contents_title_(false), |
| 168 web_contents_was_loading_(false), | 168 web_contents_was_loading_(false), |
| 169 resource_dispatcher_host_notified_(false), | 169 resource_dispatcher_host_notified_(false), |
| 170 rvh_delegate_view_(new InterstitialPageRVHDelegateView(this)), | 170 rvh_delegate_view_(new InterstitialPageRVHDelegateView(this)), |
| 171 create_view_(true), | 171 create_view_(true), |
| 172 delegate_(delegate), | 172 delegate_(delegate), |
| 173 weak_ptr_factory_(this) { | 173 weak_ptr_factory_(this) { |
| 174 InitInterstitialPageMap(); | 174 InitInterstitialPageMap(); |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 DOMStorageContextWrapper* dom_storage_context = | 519 DOMStorageContextWrapper* dom_storage_context = |
| 520 static_cast<DOMStorageContextWrapper*>( | 520 static_cast<DOMStorageContextWrapper*>( |
| 521 BrowserContext::GetStoragePartition( | 521 BrowserContext::GetStoragePartition( |
| 522 browser_context, site_instance.get())->GetDOMStorageContext()); | 522 browser_context, site_instance.get())->GetDOMStorageContext()); |
| 523 session_storage_namespace_ = | 523 session_storage_namespace_ = |
| 524 new SessionStorageNamespaceImpl(dom_storage_context); | 524 new SessionStorageNamespaceImpl(dom_storage_context); |
| 525 | 525 |
| 526 return RenderViewHostFactory::Create(site_instance.get(), | 526 return RenderViewHostFactory::Create(site_instance.get(), |
| 527 this, | 527 this, |
| 528 this, | 528 this, |
| 529 this, |
| 529 MSG_ROUTING_NONE, | 530 MSG_ROUTING_NONE, |
| 530 MSG_ROUTING_NONE, | 531 MSG_ROUTING_NONE, |
| 531 false, | 532 false, |
| 532 false); | 533 false); |
| 533 } | 534 } |
| 534 | 535 |
| 535 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { | 536 WebContentsView* InterstitialPageImpl::CreateWebContentsView() { |
| 536 if (!enabled() || !create_view_) | 537 if (!enabled() || !create_view_) |
| 537 return NULL; | 538 return NULL; |
| 538 WebContentsView* web_contents_view = web_contents()->GetView(); | 539 WebContentsView* web_contents_view = web_contents()->GetView(); |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 | 843 |
| 843 web_contents->GetDelegateView()->TakeFocus(reverse); | 844 web_contents->GetDelegateView()->TakeFocus(reverse); |
| 844 } | 845 } |
| 845 | 846 |
| 846 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 847 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
| 847 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 848 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
| 848 int active_match_ordinal, bool final_update) { | 849 int active_match_ordinal, bool final_update) { |
| 849 } | 850 } |
| 850 | 851 |
| 851 } // namespace content | 852 } // namespace content |
| OLD | NEW |