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 "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/public/browser/native_web_keyboard_event.h" | 8 #include "content/public/browser/native_web_keyboard_event.h" |
9 #include "content/public/common/renderer_preferences.h" | 9 #include "content/public/common/renderer_preferences.h" |
10 #include "content/renderer/render_thread_impl.h" | 10 #include "content/renderer/render_thread_impl.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 params.url = url; | 302 params.url = url; |
303 params.navigation_type = ViewMsg_Navigate_Type::RELOAD; | 303 params.navigation_type = ViewMsg_Navigate_Type::RELOAD; |
304 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 304 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
305 impl->OnNavigate(params); | 305 impl->OnNavigate(params); |
306 } | 306 } |
307 | 307 |
308 uint32 RenderViewTest::GetNavigationIPCType() { | 308 uint32 RenderViewTest::GetNavigationIPCType() { |
309 return ViewHostMsg_FrameNavigate::ID; | 309 return ViewHostMsg_FrameNavigate::ID; |
310 } | 310 } |
311 | 311 |
312 void RenderViewTest::Resize(gfx::Size new_size, | |
313 gfx::Rect resizer_rect, | |
314 bool is_fullscreen) { | |
315 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize( | |
316 0, new_size, resizer_rect, is_fullscreen)); | |
317 OnMessageReceived(*resize_message); | |
318 } | |
319 | |
320 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { | 312 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { |
321 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 313 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
322 return impl->OnMessageReceived(msg); | 314 return impl->OnMessageReceived(msg); |
323 } | 315 } |
324 | 316 |
325 void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, | 317 void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, |
326 bool is_new_navigation) { | 318 bool is_new_navigation) { |
327 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 319 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
328 impl->didNavigateWithinPage(frame, is_new_navigation); | 320 impl->didNavigateWithinPage(frame, is_new_navigation); |
329 } | 321 } |
(...skipping 28 matching lines...) Expand all Loading... |
358 | 350 |
359 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 351 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
360 OnMessageReceived(navigate_message); | 352 OnMessageReceived(navigate_message); |
361 | 353 |
362 // The load actually happens asynchronously, so we pump messages to process | 354 // The load actually happens asynchronously, so we pump messages to process |
363 // the pending continuation. | 355 // the pending continuation. |
364 ProcessPendingMessages(); | 356 ProcessPendingMessages(); |
365 } | 357 } |
366 | 358 |
367 } // namespace content | 359 } // namespace content |
OLD | NEW |