OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/gfx/platform_canvas.h" | |
8 #include "base/gfx/platform_canvas_win.h" | |
9 #include "base/gfx/rect.h" | 7 #include "base/gfx/rect.h" |
10 #include "base/logging.h" | 8 #include "base/logging.h" |
11 #include "base/win_util.h" | 9 #include "base/win_util.h" |
| 10 #include "skia/ext/platform_canvas.h" |
| 11 #include "skia/ext/platform_canvas_win.h" |
12 #include "webkit/glue/webinputevent.h" | 12 #include "webkit/glue/webinputevent.h" |
13 #include "webkit/glue/webwidget.h" | 13 #include "webkit/glue/webwidget.h" |
14 | 14 |
15 static const wchar_t kWindowClassName[] = L"WebWidgetHost"; | 15 static const wchar_t kWindowClassName[] = L"WebWidgetHost"; |
16 | 16 |
17 /*static*/ | 17 /*static*/ |
18 WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window, | 18 WebWidgetHost* WebWidgetHost::Create(gfx::WindowHandle parent_window, |
19 WebWidgetDelegate* delegate) { | 19 WebWidgetDelegate* delegate) { |
20 WebWidgetHost* host = new WebWidgetHost(); | 20 WebWidgetHost* host = new WebWidgetHost(); |
21 | 21 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 void WebWidgetHost::PaintRect(const gfx::Rect& rect) { | 331 void WebWidgetHost::PaintRect(const gfx::Rect& rect) { |
332 #ifndef NDEBUG | 332 #ifndef NDEBUG |
333 DCHECK(!painting_); | 333 DCHECK(!painting_); |
334 #endif | 334 #endif |
335 DCHECK(canvas_.get()); | 335 DCHECK(canvas_.get()); |
336 | 336 |
337 set_painting(true); | 337 set_painting(true); |
338 webwidget_->Paint(canvas_.get(), rect); | 338 webwidget_->Paint(canvas_.get(), rect); |
339 set_painting(false); | 339 set_painting(false); |
340 } | 340 } |
OLD | NEW |