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/test/test_render_view_host.h" | 5 #include "content/test/test_render_view_host.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
11 #include "content/common/dom_storage/dom_storage_types.h" | 11 #include "content/common/dom_storage/dom_storage_types.h" |
12 #include "content/common/frame_messages.h" | 12 #include "content/common/frame_messages.h" |
13 #include "content/common/view_messages.h" | 13 #include "content/common/view_messages.h" |
14 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
15 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
16 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
17 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
18 #include "content/public/common/page_state.h" | 18 #include "content/public/common/page_state.h" |
19 #include "content/test/test_backing_store.h" | 19 #include "content/test/test_backing_store.h" |
20 #include "content/test/test_web_contents.h" | 20 #include "content/test/test_web_contents.h" |
21 #include "media/base/video_frame.h" | 21 #include "media/base/video_frame.h" |
22 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
23 #include "webkit/common/webpreferences.h" | 23 #include "webkit/common/webpreferences.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 namespace { | 27 namespace { |
awong
2014/02/20 00:25:30
This namespace is empty now. Remove?
Charlie Reis
2014/02/20 00:43:53
Done.
| |
28 | 28 |
29 const int64 kFrameId = 13UL; | |
30 | |
31 } // namespace | 29 } // namespace |
32 | 30 |
33 | 31 |
34 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params, | 32 void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params, |
35 int page_id, | 33 int page_id, |
36 const GURL& url, | 34 const GURL& url, |
37 PageTransition transition) { | 35 PageTransition transition) { |
38 params->page_id = page_id; | 36 params->page_id = page_id; |
39 params->url = url; | 37 params->url = url; |
40 params->referrer = Referrer(); | 38 params->referrer = Referrer(); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 delete_counter_(NULL), | 242 delete_counter_(NULL), |
245 simulate_fetch_via_proxy_(false), | 243 simulate_fetch_via_proxy_(false), |
246 simulate_history_list_was_cleared_(false), | 244 simulate_history_list_was_cleared_(false), |
247 contents_mime_type_("text/html"), | 245 contents_mime_type_("text/html"), |
248 opener_route_id_(MSG_ROUTING_NONE), | 246 opener_route_id_(MSG_ROUTING_NONE), |
249 main_render_frame_host_(NULL) { | 247 main_render_frame_host_(NULL) { |
250 // TestRenderWidgetHostView installs itself into this->view_ in its | 248 // TestRenderWidgetHostView installs itself into this->view_ in its |
251 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is | 249 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is |
252 // called. | 250 // called. |
253 new TestRenderWidgetHostView(this); | 251 new TestRenderWidgetHostView(this); |
254 | |
255 main_frame_id_ = kFrameId; | |
256 } | 252 } |
257 | 253 |
258 TestRenderViewHost::~TestRenderViewHost() { | 254 TestRenderViewHost::~TestRenderViewHost() { |
259 if (delete_counter_) | 255 if (delete_counter_) |
260 ++*delete_counter_; | 256 ++*delete_counter_; |
261 } | 257 } |
262 | 258 |
263 bool TestRenderViewHost::CreateRenderView( | 259 bool TestRenderViewHost::CreateRenderView( |
264 const base::string16& frame_name, | 260 const base::string16& frame_name, |
265 int opener_route_id, | 261 int opener_route_id, |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
404 | 400 |
405 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 401 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
406 return static_cast<TestRenderFrameHost*>(main_rfh()); | 402 return static_cast<TestRenderFrameHost*>(main_rfh()); |
407 } | 403 } |
408 | 404 |
409 TestWebContents* RenderViewHostImplTestHarness::contents() { | 405 TestWebContents* RenderViewHostImplTestHarness::contents() { |
410 return static_cast<TestWebContents*>(web_contents()); | 406 return static_cast<TestWebContents*>(web_contents()); |
411 } | 407 } |
412 | 408 |
413 } // namespace content | 409 } // namespace content |
OLD | NEW |