| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "content/browser/browser_url_handler.h" | 6 #include "content/browser/browser_url_handler.h" |
| 7 #include "content/browser/renderer_host/test_backing_store.h" | 7 #include "content/browser/renderer_host/test_backing_store.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.h" | 9 #include "content/browser/site_instance.h" |
| 10 #include "content/browser/tab_contents/navigation_controller.h" | 10 #include "content/browser/tab_contents/navigation_controller.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 RenderViewHostTestHarness::RenderViewHostTestHarness() | 304 RenderViewHostTestHarness::RenderViewHostTestHarness() |
| 305 : rph_factory_(), | 305 : rph_factory_(), |
| 306 rvh_factory_(&rph_factory_), | 306 rvh_factory_(&rph_factory_), |
| 307 contents_(NULL) { | 307 contents_(NULL) { |
| 308 } | 308 } |
| 309 | 309 |
| 310 RenderViewHostTestHarness::~RenderViewHostTestHarness() { | 310 RenderViewHostTestHarness::~RenderViewHostTestHarness() { |
| 311 } | 311 } |
| 312 | 312 |
| 313 NavigationController& RenderViewHostTestHarness::controller() { | 313 NavigationController& RenderViewHostTestHarness::controller() { |
| 314 return contents()->GetController(); | 314 return contents()->GetControllerImpl(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 TestTabContents* RenderViewHostTestHarness::contents() { | 317 TestTabContents* RenderViewHostTestHarness::contents() { |
| 318 return contents_.get(); | 318 return contents_.get(); |
| 319 } | 319 } |
| 320 | 320 |
| 321 TestRenderViewHost* RenderViewHostTestHarness::rvh() { | 321 TestRenderViewHost* RenderViewHostTestHarness::rvh() { |
| 322 return static_cast<TestRenderViewHost*>(contents()->GetRenderViewHost()); | 322 return static_cast<TestRenderViewHost*>(contents()->GetRenderViewHost()); |
| 323 } | 323 } |
| 324 | 324 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 SetContents(NULL); | 380 SetContents(NULL); |
| 381 | 381 |
| 382 // Make sure that we flush any messages related to TabContents destruction | 382 // Make sure that we flush any messages related to TabContents destruction |
| 383 // before we destroy the browser context. | 383 // before we destroy the browser context. |
| 384 MessageLoop::current()->RunAllPending(); | 384 MessageLoop::current()->RunAllPending(); |
| 385 | 385 |
| 386 // Release the browser context on the UI thread. | 386 // Release the browser context on the UI thread. |
| 387 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); | 387 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); |
| 388 message_loop_.RunAllPending(); | 388 message_loop_.RunAllPending(); |
| 389 } | 389 } |
| OLD | NEW |