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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 return FrameHostMsg_DidCommitProvisionalLoad::ID; | 357 return FrameHostMsg_DidCommitProvisionalLoad::ID; |
358 } | 358 } |
359 | 359 |
360 void RenderViewTest::Resize(gfx::Size new_size, | 360 void RenderViewTest::Resize(gfx::Size new_size, |
361 gfx::Rect resizer_rect, | 361 gfx::Rect resizer_rect, |
362 bool is_fullscreen) { | 362 bool is_fullscreen) { |
363 ViewMsg_Resize_Params params; | 363 ViewMsg_Resize_Params params; |
364 params.screen_info = blink::WebScreenInfo(); | 364 params.screen_info = blink::WebScreenInfo(); |
365 params.new_size = new_size; | 365 params.new_size = new_size; |
366 params.physical_backing_size = new_size; | 366 params.physical_backing_size = new_size; |
367 params.top_controls_layout_height = 0.f; | 367 params.top_controls_height = 0.f; |
| 368 params.top_controls_shrink_blink_size = false; |
368 params.resizer_rect = resizer_rect; | 369 params.resizer_rect = resizer_rect; |
369 params.is_fullscreen = is_fullscreen; | 370 params.is_fullscreen = is_fullscreen; |
370 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); | 371 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params)); |
371 OnMessageReceived(*resize_message); | 372 OnMessageReceived(*resize_message); |
372 } | 373 } |
373 | 374 |
374 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { | 375 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { |
375 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 376 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
376 return impl->OnMessageReceived(msg); | 377 return impl->OnMessageReceived(msg); |
377 } | 378 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), | 437 FrameMsg_Navigate navigate_message(impl->GetMainRenderFrame()->GetRoutingID(), |
437 navigate_params); | 438 navigate_params); |
438 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); | 439 impl->GetMainRenderFrame()->OnMessageReceived(navigate_message); |
439 | 440 |
440 // The load actually happens asynchronously, so we pump messages to process | 441 // The load actually happens asynchronously, so we pump messages to process |
441 // the pending continuation. | 442 // the pending continuation. |
442 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 443 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
443 } | 444 } |
444 | 445 |
445 } // namespace content | 446 } // namespace content |
OLD | NEW |