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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 } | 304 } |
305 | 305 |
306 uint32 RenderViewTest::GetNavigationIPCType() { | 306 uint32 RenderViewTest::GetNavigationIPCType() { |
307 return ViewHostMsg_FrameNavigate::ID; | 307 return ViewHostMsg_FrameNavigate::ID; |
308 } | 308 } |
309 | 309 |
310 void RenderViewTest::Resize(gfx::Size new_size, | 310 void RenderViewTest::Resize(gfx::Size new_size, |
311 gfx::Rect resizer_rect, | 311 gfx::Rect resizer_rect, |
312 bool is_fullscreen) { | 312 bool is_fullscreen) { |
313 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize( | 313 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize( |
314 0, new_size, resizer_rect, is_fullscreen)); | 314 0, new_size, new_size, resizer_rect, is_fullscreen)); |
315 OnMessageReceived(*resize_message); | 315 OnMessageReceived(*resize_message); |
316 } | 316 } |
317 | 317 |
318 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { | 318 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { |
319 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); | 319 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); |
320 return impl->OnMessageReceived(msg); | 320 return impl->OnMessageReceived(msg); |
321 } | 321 } |
322 | 322 |
323 void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, | 323 void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, |
324 bool is_new_navigation) { | 324 bool is_new_navigation) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 356 |
357 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); | 357 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); |
358 OnMessageReceived(navigate_message); | 358 OnMessageReceived(navigate_message); |
359 | 359 |
360 // The load actually happens asynchronously, so we pump messages to process | 360 // The load actually happens asynchronously, so we pump messages to process |
361 // the pending continuation. | 361 // the pending continuation. |
362 ProcessPendingMessages(); | 362 ProcessPendingMessages(); |
363 } | 363 } |
364 | 364 |
365 } // namespace content | 365 } // namespace content |
OLD | NEW |