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/test_web_contents.h" | 5 #include "content/browser/web_contents/test_web_contents.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/browser/browser_url_handler_impl.h" | 9 #include "content/browser/browser_url_handler_impl.h" |
10 #include "content/browser/renderer_host/render_view_host_impl.h" | 10 #include "content/browser/renderer_host/render_view_host_impl.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 expect_set_history_length_and_prune_min_page_id_(-1) { | 32 expect_set_history_length_and_prune_min_page_id_(-1) { |
33 } | 33 } |
34 | 34 |
35 TestWebContents* TestWebContents::Create(BrowserContext* browser_context, | 35 TestWebContents* TestWebContents::Create(BrowserContext* browser_context, |
36 SiteInstance* instance) { | 36 SiteInstance* instance) { |
37 TestWebContents* test_web_contents = new TestWebContents(browser_context); | 37 TestWebContents* test_web_contents = new TestWebContents(browser_context); |
38 test_web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL); | 38 test_web_contents->Init(browser_context, instance, MSG_ROUTING_NONE, NULL); |
39 return test_web_contents; | 39 return test_web_contents; |
40 } | 40 } |
41 | 41 |
| 42 TestWebContents* TestWebContents::CreateWithoutInit( |
| 43 BrowserContext* browser_context) { |
| 44 return new TestWebContents(browser_context); |
| 45 } |
| 46 |
42 TestWebContents::~TestWebContents() { | 47 TestWebContents::~TestWebContents() { |
43 } | 48 } |
44 | 49 |
45 RenderViewHost* TestWebContents::GetPendingRenderViewHost() const { | 50 RenderViewHost* TestWebContents::GetPendingRenderViewHost() const { |
46 return render_manager_.pending_render_view_host_; | 51 return render_manager_.pending_render_view_host_; |
47 } | 52 } |
48 | 53 |
49 TestRenderViewHost* TestWebContents::pending_test_rvh() const { | 54 TestRenderViewHost* TestWebContents::pending_test_rvh() const { |
50 return static_cast<TestRenderViewHost*>(GetPendingRenderViewHost()); | 55 return static_cast<TestRenderViewHost*>(GetPendingRenderViewHost()); |
51 } | 56 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 227 } |
223 | 228 |
224 void TestWebContents::ShowCreatedWidget(int route_id, | 229 void TestWebContents::ShowCreatedWidget(int route_id, |
225 const gfx::Rect& initial_pos) { | 230 const gfx::Rect& initial_pos) { |
226 } | 231 } |
227 | 232 |
228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { | 233 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { |
229 } | 234 } |
230 | 235 |
231 } // namespace content | 236 } // namespace content |
OLD | NEW |