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

Side by Side Diff: webkit/tools/test_shell/webwidget_host_win.cc

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unnecessary headers. Created 9 years, 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/tools/test_shell/webwidget_host.h" 5 #include "webkit/tools/test_shell/webwidget_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "skia/ext/platform_canvas.h" 8 #include "skia/ext/platform_canvas.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 DLOG_IF(WARNING, i == 1) << "painting caused additional invalidations"; 273 DLOG_IF(WARNING, i == 1) << "painting caused additional invalidations";
274 PaintRect(rect); 274 PaintRect(rect);
275 } 275 }
276 } 276 }
277 DCHECK(paint_rect_.IsEmpty()); 277 DCHECK(paint_rect_.IsEmpty());
278 278
279 // Paint to the screen 279 // Paint to the screen
280 PAINTSTRUCT ps; 280 PAINTSTRUCT ps;
281 BeginPaint(view_, &ps); 281 BeginPaint(view_, &ps);
282 canvas_->getTopPlatformDevice().drawToHDC(ps.hdc, 282 skia::platform_util::DrawToHDC(&canvas_->getTopDevice(), ps.hdc,
283 ps.rcPaint.left, 283 ps.rcPaint.left, ps.rcPaint.top,
284 ps.rcPaint.top, 284 &ps.rcPaint);
285 &ps.rcPaint);
286 EndPaint(view_, &ps); 285 EndPaint(view_, &ps);
287 286
288 // Draw children 287 // Draw children
289 UpdateWindow(view_); 288 UpdateWindow(view_);
290 } 289 }
291 290
292 WebScreenInfo WebWidgetHost::GetScreenInfo() { 291 WebScreenInfo WebWidgetHost::GetScreenInfo() {
293 return WebScreenInfoFactory::screenInfo(view_); 292 return WebScreenInfoFactory::screenInfo(view_);
294 } 293 }
295 294
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 void WebWidgetHost::PaintRect(const gfx::Rect& rect) { 374 void WebWidgetHost::PaintRect(const gfx::Rect& rect) {
376 #ifndef NDEBUG 375 #ifndef NDEBUG
377 DCHECK(!painting_); 376 DCHECK(!painting_);
378 #endif 377 #endif
379 DCHECK(canvas_.get()); 378 DCHECK(canvas_.get());
380 379
381 set_painting(true); 380 set_painting(true);
382 webwidget_->paint(canvas_.get(), rect); 381 webwidget_->paint(canvas_.get(), rect);
383 set_painting(false); 382 set_painting(false);
384 } 383 }
OLDNEW
« skia/ext/platform_device.h ('K') | « webkit/tools/test_shell/mac/webwidget_host.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698