Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Side by Side Diff: content/public/test/render_view_test.cc

Issue 16048003: Fix race between DPI and window size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove semicolon Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/test/render_widget_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/input_messages.h" 8 #include "content/common/input_messages.h"
9 #include "content/common/view_messages.h" 9 #include "content/common/view_messages.h"
10 #include "content/public/browser/native_web_keyboard_event.h" 10 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 impl->OnNavigate(params); 310 impl->OnNavigate(params);
311 } 311 }
312 312
313 uint32 RenderViewTest::GetNavigationIPCType() { 313 uint32 RenderViewTest::GetNavigationIPCType() {
314 return ViewHostMsg_FrameNavigate::ID; 314 return ViewHostMsg_FrameNavigate::ID;
315 } 315 }
316 316
317 void RenderViewTest::Resize(gfx::Size new_size, 317 void RenderViewTest::Resize(gfx::Size new_size,
318 gfx::Rect resizer_rect, 318 gfx::Rect resizer_rect,
319 bool is_fullscreen) { 319 bool is_fullscreen) {
320 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize( 320 ViewMsg_Resize_Params params;
321 0, new_size, new_size, 0.f, resizer_rect, is_fullscreen)); 321 params.screen_info = WebKit::WebScreenInfo();
322 params.new_size = new_size;
323 params.physical_backing_size = new_size;
324 params.overdraw_bottom_height = 0.f;
325 params.resizer_rect = resizer_rect;
326 params.is_fullscreen = is_fullscreen;
327 scoped_ptr<IPC::Message> resize_message(new ViewMsg_Resize(0, params));
322 OnMessageReceived(*resize_message); 328 OnMessageReceived(*resize_message);
323 } 329 }
324 330
325 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { 331 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) {
326 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 332 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
327 return impl->OnMessageReceived(msg); 333 return impl->OnMessageReceived(msg);
328 } 334 }
329 335
330 void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, 336 void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame,
331 bool is_new_navigation) { 337 bool is_new_navigation) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 369
364 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params); 370 ViewMsg_Navigate navigate_message(impl->GetRoutingID(), navigate_params);
365 OnMessageReceived(navigate_message); 371 OnMessageReceived(navigate_message);
366 372
367 // The load actually happens asynchronously, so we pump messages to process 373 // The load actually happens asynchronously, so we pump messages to process
368 // the pending continuation. 374 // the pending continuation.
369 ProcessPendingMessages(); 375 ProcessPendingMessages();
370 } 376 }
371 377
372 } // namespace content 378 } // namespace content
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/test/render_widget_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698