| 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/renderer_host/test_backing_store.h" | 5 #include "content/browser/renderer_host/test_backing_store.h" |
| 6 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 6 #include "content/browser/dom_storage/dom_storage_context_impl.h" |
| 7 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 7 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 8 #include "content/browser/renderer_host/test_render_view_host.h" | 8 #include "content/browser/renderer_host/test_render_view_host.h" |
| 9 #include "content/browser/site_instance_impl.h" | 9 #include "content/browser/site_instance_impl.h" |
| 10 #include "content/browser/web_contents/navigation_controller_impl.h" | 10 #include "content/browser/web_contents/navigation_controller_impl.h" |
| 11 #include "content/browser/web_contents/test_web_contents.h" | 11 #include "content/browser/web_contents/test_web_contents.h" |
| 12 #include "content/common/view_messages.h" | 12 #include "content/common/view_messages.h" |
| 13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
| 14 #include "content/public/browser/navigation_controller.h" | 14 #include "content/public/browser/navigation_controller.h" |
| 15 #include "content/public/browser/storage_partition.h" |
| 15 #include "content/public/common/content_client.h" | 16 #include "content/public/common/content_client.h" |
| 16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 17 #include "webkit/dom_storage/dom_storage_types.h" | 18 #include "webkit/dom_storage/dom_storage_types.h" |
| 18 #include "webkit/forms/password_form.h" | 19 #include "webkit/forms/password_form.h" |
| 19 #include "webkit/glue/webkit_glue.h" | 20 #include "webkit/glue/webkit_glue.h" |
| 20 #include "webkit/glue/webpreferences.h" | 21 #include "webkit/glue/webpreferences.h" |
| 21 | 22 |
| 22 using content::NativeWebKeyboardEvent; | 23 using content::NativeWebKeyboardEvent; |
| 23 using webkit::forms::PasswordForm; | 24 using webkit::forms::PasswordForm; |
| 24 | 25 |
| 25 namespace content { | 26 namespace content { |
| 26 | 27 |
| 27 namespace { | 28 namespace { |
| 28 // Normally this is done by the NavigationController, but we'll fake it out | 29 // Normally this is done by the NavigationController, but we'll fake it out |
| 29 // here for testing. | 30 // here for testing. |
| 30 SessionStorageNamespaceImpl* CreateSessionStorageNamespace( | 31 SessionStorageNamespaceImpl* CreateSessionStorageNamespace( |
| 31 SiteInstance* instance) { | 32 SiteInstance* instance) { |
| 32 RenderProcessHost* process_host = instance->GetProcess(); | 33 RenderProcessHost* process_host = instance->GetProcess(); |
| 33 DOMStorageContext* dom_storage_context = | 34 DOMStorageContext* dom_storage_context = |
| 34 BrowserContext::GetDOMStorageContext(process_host->GetBrowserContext(), | 35 BrowserContext::GetStoragePartition(process_host->GetBrowserContext(), |
| 35 process_host->GetID()); | 36 instance)->GetDOMStorageContext(); |
| 36 return new SessionStorageNamespaceImpl( | 37 return new SessionStorageNamespaceImpl( |
| 37 static_cast<DOMStorageContextImpl*>(dom_storage_context)); | 38 static_cast<DOMStorageContextImpl*>(dom_storage_context)); |
| 38 } | 39 } |
| 39 } // namespace | 40 } // namespace |
| 40 | 41 |
| 41 | 42 |
| 42 void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, | 43 void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, |
| 43 int page_id, | 44 int page_id, |
| 44 const GURL& url, | 45 const GURL& url, |
| 45 PageTransition transition) { | 46 PageTransition transition) { |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 383 |
| 383 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { | 384 TestRenderViewHost* RenderViewHostImplTestHarness::active_test_rvh() { |
| 384 return static_cast<TestRenderViewHost*>(active_rvh()); | 385 return static_cast<TestRenderViewHost*>(active_rvh()); |
| 385 } | 386 } |
| 386 | 387 |
| 387 TestWebContents* RenderViewHostImplTestHarness::contents() { | 388 TestWebContents* RenderViewHostImplTestHarness::contents() { |
| 388 return static_cast<TestWebContents*>(web_contents()); | 389 return static_cast<TestWebContents*>(web_contents()); |
| 389 } | 390 } |
| 390 | 391 |
| 391 } // namespace content | 392 } // namespace content |
| OLD | NEW |