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/public/test/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "content/common/dom_storage/dom_storage_types.h" | 8 #include "content/common/dom_storage/dom_storage_types.h" |
9 #include "content/common/frame_messages.h" | 9 #include "content/common/frame_messages.h" |
10 #include "content/common/input_messages.h" | 10 #include "content/common/input_messages.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 return FrameHostMsg_DidCommitProvisionalLoad::ID; | 348 return FrameHostMsg_DidCommitProvisionalLoad::ID; |
349 } | 349 } |
350 | 350 |
351 void RenderViewTest::Resize(gfx::Size new_size, | 351 void RenderViewTest::Resize(gfx::Size new_size, |
352 gfx::Rect resizer_rect, | 352 gfx::Rect resizer_rect, |
353 bool is_fullscreen) { | 353 bool is_fullscreen) { |
354 ViewMsg_Resize_Params params; | 354 ViewMsg_Resize_Params params; |
355 params.screen_info = blink::WebScreenInfo(); | 355 params.screen_info = blink::WebScreenInfo(); |
356 params.new_size = new_size; | 356 params.new_size = new_size; |
357 params.physical_backing_size = new_size; | 357 params.physical_backing_size = new_size; |
358 params.overdraw_bottom_height = 0.f; | 358 params.top_controls_layout_height = 0.f; |
359 params.resizer_rect = resizer_rect; | 359 params.resizer_rect = resizer_rect; |
360 params.is_fullscreen = is_fullscreen; | 360 params.is_fullscreen = is_fullscreen; |
361 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); | 361 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); |
362 OnMessageReceived(*resize_message); | 362 OnMessageReceived(*resize_message); |
363 } | 363 } |
364 | 364 |
365 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { | 365 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { |
366 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 366 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
367 return impl->OnMessageReceived(msg); | 367 return impl->OnMessageReceived(msg); |
368 } | 368 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), | 422 FrameMsg_Navigate navigate_message(impl->main_render_frame()->GetRoutingID(), |
423 navigate_params); | 423 navigate_params); |
424 impl->main_render_frame()->OnMessageReceived(navigate_message); | 424 impl->main_render_frame()->OnMessageReceived(navigate_message); |
425 | 425 |
426 // The load actually happens asynchronously, so we pump messages to process | 426 // The load actually happens asynchronously, so we pump messages to process |
427 // the pending continuation. | 427 // the pending continuation. |
428 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 428 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
429 } | 429 } |
430 | 430 |
431 } // namespace content | 431 } // namespace content |
OLD | NEW |