OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/interstitial_page_impl.h" | 5 #include "content/browser/web_contents/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_impl.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/loader/resource_dispatcher_host_impl.h" | 17 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
18 #include "content/browser/renderer_host/render_process_host_impl.h" | 18 #include "content/browser/renderer_host/render_process_host_impl.h" |
19 #include "content/browser/renderer_host/render_view_host_impl.h" | 19 #include "content/browser/renderer_host/render_view_host_impl.h" |
20 #include "content/browser/site_instance_impl.h" | 20 #include "content/browser/site_instance_impl.h" |
21 #include "content/browser/web_contents/navigation_controller_impl.h" | 21 #include "content/browser/web_contents/navigation_controller_impl.h" |
22 #include "content/browser/web_contents/navigation_entry_impl.h" | 22 #include "content/browser/web_contents/navigation_entry_impl.h" |
23 #include "content/browser/web_contents/web_contents_impl.h" | 23 #include "content/browser/web_contents/web_contents_impl.h" |
24 #include "content/common/view_messages.h" | 24 #include "content/common/view_messages.h" |
25 #include "content/port/browser/render_view_host_delegate_view.h" | 25 #include "content/port/browser/render_view_host_delegate_view.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 | 483 |
484 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { | 484 RenderViewHost* InterstitialPageImpl::CreateRenderViewHost() { |
485 if (!enabled()) | 485 if (!enabled()) |
486 return NULL; | 486 return NULL; |
487 | 487 |
488 // Interstitial pages don't want to share the session storage so we mint a | 488 // Interstitial pages don't want to share the session storage so we mint a |
489 // new one. | 489 // new one. |
490 BrowserContext* browser_context = web_contents()->GetBrowserContext(); | 490 BrowserContext* browser_context = web_contents()->GetBrowserContext(); |
491 scoped_refptr<SiteInstance> site_instance = | 491 scoped_refptr<SiteInstance> site_instance = |
492 SiteInstance::Create(browser_context); | 492 SiteInstance::Create(browser_context); |
493 DOMStorageContextImpl* dom_storage_context = | 493 DOMStorageContextWrapper* dom_storage_context = |
494 static_cast<DOMStorageContextImpl*>(BrowserContext::GetStoragePartition( | 494 static_cast<DOMStorageContextWrapper*>( |
495 browser_context, site_instance.get())->GetDOMStorageContext()); | 495 BrowserContext::GetStoragePartition( |
| 496 browser_context, site_instance.get())->GetDOMStorageContext()); |
496 session_storage_namespace_ = | 497 session_storage_namespace_ = |
497 new SessionStorageNamespaceImpl(dom_storage_context); | 498 new SessionStorageNamespaceImpl(dom_storage_context); |
498 | 499 |
499 RenderViewHostImpl* render_view_host = | 500 RenderViewHostImpl* render_view_host = |
500 new RenderViewHostImpl(site_instance.get(), | 501 new RenderViewHostImpl(site_instance.get(), |
501 this, | 502 this, |
502 this, | 503 this, |
503 MSG_ROUTING_NONE, | 504 MSG_ROUTING_NONE, |
504 MSG_ROUTING_NONE, | 505 MSG_ROUTING_NONE, |
505 false); | 506 false); |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 | 811 |
811 web_contents->GetDelegateView()->TakeFocus(reverse); | 812 web_contents->GetDelegateView()->TakeFocus(reverse); |
812 } | 813 } |
813 | 814 |
814 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( | 815 void InterstitialPageImpl::InterstitialPageRVHDelegateView::OnFindReply( |
815 int request_id, int number_of_matches, const gfx::Rect& selection_rect, | 816 int request_id, int number_of_matches, const gfx::Rect& selection_rect, |
816 int active_match_ordinal, bool final_update) { | 817 int active_match_ordinal, bool final_update) { |
817 } | 818 } |
818 | 819 |
819 } // namespace content | 820 } // namespace content |
OLD | NEW |