| Index: ppapi/thunk/ppb_scrollbar_group_thunk.cc
|
| ===================================================================
|
| --- ppapi/thunk/ppb_scrollbar_group_thunk.cc (revision 0)
|
| +++ ppapi/thunk/ppb_scrollbar_group_thunk.cc (revision 0)
|
| @@ -0,0 +1,77 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ppapi/thunk/thunk.h"
|
| +#include "ppapi/thunk/enter.h"
|
| +#include "ppapi/thunk/ppb_scrollbar_group_api.h"
|
| +#include "ppapi/thunk/resource_creation_api.h"
|
| +
|
| +namespace ppapi {
|
| +namespace thunk {
|
| +
|
| +typedef EnterResource<PPB_ScrollbarGroup_API> EnterScrollbarGroup;
|
| +
|
| +namespace {
|
| +
|
| +PP_Resource Create(PP_Instance instance) {
|
| + EnterFunction<ResourceCreationAPI> enter(instance, true);
|
| + if (enter.failed())
|
| + return 0;
|
| + return enter.functions()->CreateScrollbarGroup(instance);
|
| +}
|
| +
|
| +void MouseEnteredContentArea(PP_Resource resource) {
|
| + EnterScrollbarGroup enter(resource, false);
|
| + if (!enter.failed())
|
| + enter.object()->MouseEnteredContentArea();
|
| +}
|
| +
|
| +void MouseMovedInContentArea(PP_Resource scrollbar) {
|
| + EnterScrollbarGroup enter(scrollbar, true);
|
| + if (!enter.failed())
|
| + enter.object()->MouseMovedInContentArea();
|
| +}
|
| +
|
| +void MouseExitedContentArea(PP_Resource scrollbar) {
|
| + EnterScrollbarGroup enter(scrollbar, true);
|
| + if (!enter.failed())
|
| + enter.object()->MouseExitedContentArea();
|
| +}
|
| +
|
| +void WillStartLiveResize(PP_Resource resource) {
|
| + EnterScrollbarGroup enter(resource, false);
|
| + if (!enter.failed())
|
| + enter.object()->WillStartLiveResize();
|
| +}
|
| +
|
| +void ContentResized(PP_Resource scrollbar) {
|
| + EnterScrollbarGroup enter(scrollbar, true);
|
| + if (!enter.failed())
|
| + enter.object()->ContentResized();
|
| +}
|
| +
|
| +void WillEndLiveResize(PP_Resource scrollbar) {
|
| + EnterScrollbarGroup enter(scrollbar, true);
|
| + if (!enter.failed())
|
| + enter.object()->WillEndLiveResize();
|
| +}
|
| +
|
| +const PPB_ScrollbarGroup_Dev g_ppb_scrollbar_group_thunk = {
|
| + &Create,
|
| + &MouseEnteredContentArea,
|
| + &MouseMovedInContentArea,
|
| + &MouseExitedContentArea,
|
| + &WillStartLiveResize,
|
| + &ContentResized,
|
| + &WillEndLiveResize
|
| +};
|
| +
|
| +} // namespace
|
| +
|
| +const PPB_ScrollbarGroup_Dev* GetPPB_ScrollbarGroup_Thunk() {
|
| + return &g_ppb_scrollbar_group_thunk;
|
| +}
|
| +
|
| +} // namespace thunk
|
| +} // namespace ppapi
|
|
|
| Property changes on: ppapi\thunk\ppb_scrollbar_group_thunk.cc
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|