OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/plugins/ppapi/ppb_scrollbar_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_scrollbar_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "ppapi/c/dev/ppp_scrollbar_dev.h" | 9 #include "ppapi/c/dev/ppp_scrollbar_dev.h" |
10 #include "skia/ext/platform_canvas.h" | 10 #include "skia/ext/platform_canvas.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 rect->point.y, | 171 rect->point.y, |
172 rect->size.width, | 172 rect->size.width, |
173 rect->size.height); | 173 rect->size.height); |
174 skia::PlatformCanvas* canvas = image->mapped_canvas(); | 174 skia::PlatformCanvas* canvas = image->mapped_canvas(); |
175 if (!canvas) | 175 if (!canvas) |
176 return false; | 176 return false; |
177 scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), gfx_rect); | 177 scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), gfx_rect); |
178 | 178 |
179 #if defined(OS_WIN) | 179 #if defined(OS_WIN) |
180 if (base::win::GetVersion() == base::win::VERSION_XP) { | 180 if (base::win::GetVersion() == base::win::VERSION_XP) { |
181 canvas->getTopPlatformDevice().makeOpaque( | 181 skia::MakeOpaque(canvas, gfx_rect.x(), gfx_rect.y(), |
182 gfx_rect.x(), gfx_rect.y(), gfx_rect.width(), gfx_rect.height()); | 182 gfx_rect.width(), gfx_rect.height()); |
183 } | 183 } |
184 #endif | 184 #endif |
185 | 185 |
186 return true; | 186 return true; |
187 } | 187 } |
188 | 188 |
189 bool PPB_Scrollbar_Impl::HandleEvent(const PP_InputEvent* event) { | 189 bool PPB_Scrollbar_Impl::HandleEvent(const PP_InputEvent* event) { |
190 scoped_ptr<WebInputEvent> web_input_event(CreateWebInputEvent(*event)); | 190 scoped_ptr<WebInputEvent> web_input_event(CreateWebInputEvent(*event)); |
191 if (!web_input_event.get()) | 191 if (!web_input_event.get()) |
192 return false; | 192 return false; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 pp_rect.point.y = dirty_.y(); | 247 pp_rect.point.y = dirty_.y(); |
248 pp_rect.size.width = dirty_.width(); | 248 pp_rect.size.width = dirty_.width(); |
249 pp_rect.size.height = dirty_.height(); | 249 pp_rect.size.height = dirty_.height(); |
250 dirty_ = gfx::Rect(); | 250 dirty_ = gfx::Rect(); |
251 Invalidate(&pp_rect); | 251 Invalidate(&pp_rect); |
252 } | 252 } |
253 | 253 |
254 } // namespace ppapi | 254 } // namespace ppapi |
255 } // namespace webkit | 255 } // namespace webkit |
256 | 256 |
OLD | NEW |