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

Unified Diff: webkit/plugins/ppapi/ppb_scrollbar_impl.cc

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppb_scrollbar_impl.h ('k') | webkit/plugins/ppapi/ppb_surface_3d_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_scrollbar_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_scrollbar_impl.cc (revision 89672)
+++ webkit/plugins/ppapi/ppb_scrollbar_impl.cc (working copy)
@@ -166,34 +166,29 @@
scrollbar_->scroll(direction, granularity, fmultiplier);
}
-bool PPB_Scrollbar_Impl::Paint(const PP_Rect* rect, PPB_ImageData_Impl* image) {
- gfx::Rect gfx_rect(rect->point.x,
- rect->point.y,
- rect->size.width,
- rect->size.height);
+PP_Bool PPB_Scrollbar_Impl::HandleEvent(const PP_InputEvent* event) {
+ scoped_ptr<WebInputEvent> web_input_event(CreateWebInputEvent(*event));
+ if (!web_input_event.get())
+ return PP_FALSE;
+
+ return PP_FromBool(scrollbar_->handleInputEvent(*web_input_event.get()));
+}
+
+PP_Bool PPB_Scrollbar_Impl::PaintInternal(const gfx::Rect& rect,
+ PPB_ImageData_Impl* image) {
skia::PlatformCanvas* canvas = image->mapped_canvas();
if (!canvas)
- return false;
- scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), gfx_rect);
+ return PP_FALSE;
+ scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), rect);
#if defined(OS_WIN)
- if (base::win::GetVersion() == base::win::VERSION_XP) {
- skia::MakeOpaque(canvas, gfx_rect.x(), gfx_rect.y(),
- gfx_rect.width(), gfx_rect.height());
- }
+ if (base::win::GetVersion() == base::win::VERSION_XP)
+ skia::MakeOpaque(canvas, rect.x(), rect.y(), rect.width(), rect.height());
#endif
- return true;
+ return PP_TRUE;
}
-bool PPB_Scrollbar_Impl::HandleEvent(const PP_InputEvent* event) {
- scoped_ptr<WebInputEvent> web_input_event(CreateWebInputEvent(*event));
- if (!web_input_event.get())
- return false;
-
- return scrollbar_->handleInputEvent(*web_input_event.get());
-}
-
void PPB_Scrollbar_Impl::SetLocationInternal(const PP_Rect* location) {
scrollbar_->setLocation(WebRect(location->point.x,
location->point.y,
« no previous file with comments | « webkit/plugins/ppapi/ppb_scrollbar_impl.h ('k') | webkit/plugins/ppapi/ppb_surface_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698