| 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" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 ui::PageTransition transition, | 311 ui::PageTransition transition, |
| 312 const GURL& original_request_url, | 312 const GURL& original_request_url, |
| 313 int response_code, | 313 int response_code, |
| 314 const base::FilePath* file_path_for_history_item) { | 314 const base::FilePath* file_path_for_history_item) { |
| 315 | 315 |
| 316 main_render_frame_host_->SendNavigateWithParameters( | 316 main_render_frame_host_->SendNavigateWithParameters( |
| 317 page_id, url, transition, original_request_url, response_code, | 317 page_id, url, transition, original_request_url, response_code, |
| 318 file_path_for_history_item, std::vector<GURL>()); | 318 file_path_for_history_item, std::vector<GURL>()); |
| 319 } | 319 } |
| 320 | 320 |
| 321 void TestRenderViewHost::SendBeforeUnloadACK(bool proceed) { | |
| 322 // TODO(creis): Move this whole method to TestRenderFrameHost. | |
| 323 base::TimeTicks now = base::TimeTicks::Now(); | |
| 324 main_render_frame_host_->OnBeforeUnloadACK(proceed, now, now); | |
| 325 } | |
| 326 | |
| 327 void TestRenderViewHost::SetContentsMimeType(const std::string& mime_type) { | 321 void TestRenderViewHost::SetContentsMimeType(const std::string& mime_type) { |
| 328 contents_mime_type_ = mime_type; | 322 contents_mime_type_ = mime_type; |
| 329 main_render_frame_host_->set_contents_mime_type(mime_type); | 323 main_render_frame_host_->set_contents_mime_type(mime_type); |
| 330 } | 324 } |
| 331 | 325 |
| 332 void TestRenderViewHost::SimulateSwapOutACK() { | |
| 333 OnSwappedOut(false); | |
| 334 } | |
| 335 | |
| 336 void TestRenderViewHost::SimulateWasHidden() { | 326 void TestRenderViewHost::SimulateWasHidden() { |
| 337 WasHidden(); | 327 WasHidden(); |
| 338 } | 328 } |
| 339 | 329 |
| 340 void TestRenderViewHost::SimulateWasShown() { | 330 void TestRenderViewHost::SimulateWasShown() { |
| 341 WasShown(ui::LatencyInfo()); | 331 WasShown(ui::LatencyInfo()); |
| 342 } | 332 } |
| 343 | 333 |
| 344 void TestRenderViewHost::TestOnStartDragging( | 334 void TestRenderViewHost::TestOnStartDragging( |
| 345 const DropData& drop_data) { | 335 const DropData& drop_data) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 384 |
| 395 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 385 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
| 396 return contents()->GetMainFrame(); | 386 return contents()->GetMainFrame(); |
| 397 } | 387 } |
| 398 | 388 |
| 399 TestWebContents* RenderViewHostImplTestHarness::contents() { | 389 TestWebContents* RenderViewHostImplTestHarness::contents() { |
| 400 return static_cast<TestWebContents*>(web_contents()); | 390 return static_cast<TestWebContents*>(web_contents()); |
| 401 } | 391 } |
| 402 | 392 |
| 403 } // namespace content | 393 } // namespace content |
| OLD | NEW |