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

Unified Diff: ppapi/thunk/ppb_scrollbar_thunk.cc

Issue 1161563002: Remove unused in-process pepper APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/thunk/ppb_scrollbar_api.h ('k') | ppapi/thunk/ppb_video_encoder_thunk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_scrollbar_thunk.cc
diff --git a/ppapi/thunk/ppb_scrollbar_thunk.cc b/ppapi/thunk/ppb_scrollbar_thunk.cc
deleted file mode 100644
index 589948c16530933a8af2a5f5b0305783dde61d63..0000000000000000000000000000000000000000
--- a/ppapi/thunk/ppb_scrollbar_thunk.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2012 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_api.h"
-#include "ppapi/thunk/resource_creation_api.h"
-
-namespace ppapi {
-namespace thunk {
-
-typedef EnterResource<PPB_Scrollbar_API> EnterScrollbar;
-
-namespace {
-
-PP_Resource Create(PP_Instance instance, PP_Bool vertical) {
- EnterResourceCreation enter(instance);
- if (enter.failed())
- return 0;
- return enter.functions()->CreateScrollbar(instance, vertical);
-}
-
-PP_Bool IsScrollbar(PP_Resource resource) {
- EnterScrollbar enter(resource, false);
- return PP_FromBool(enter.succeeded());
-}
-
-uint32_t GetThickness(PP_Resource scrollbar) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.failed())
- return 0;
- return enter.object()->GetThickness();
-}
-
-PP_Bool IsOverlay(PP_Resource scrollbar) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.failed())
- return PP_FALSE;
- return PP_FromBool(enter.object()->IsOverlay());
-}
-
-uint32_t GetValue(PP_Resource scrollbar) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.failed())
- return 0;
- return enter.object()->GetValue();
-}
-
-void SetValue(PP_Resource scrollbar, uint32_t value) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.succeeded())
- enter.object()->SetValue(value);
-}
-
-void SetDocumentSize(PP_Resource scrollbar, uint32_t size) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.succeeded())
- enter.object()->SetDocumentSize(size);
-}
-
-void SetTickMarks(PP_Resource scrollbar,
- const PP_Rect* tick_marks,
- uint32_t count) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.succeeded())
- enter.object()->SetTickMarks(tick_marks, count);
-}
-
-void ScrollBy(PP_Resource scrollbar, PP_ScrollBy_Dev unit, int32_t multiplier) {
- EnterScrollbar enter(scrollbar, true);
- if (enter.succeeded())
- enter.object()->ScrollBy(unit, multiplier);
-}
-
-const PPB_Scrollbar_Dev g_ppb_scrollbar_thunk = {
- &Create,
- &IsScrollbar,
- &GetThickness,
- &IsOverlay,
- &GetValue,
- &SetValue,
- &SetDocumentSize,
- &SetTickMarks,
- &ScrollBy
-};
-
-} // namespace
-
-const PPB_Scrollbar_Dev_0_5* GetPPB_Scrollbar_Dev_0_5_Thunk() {
- return &g_ppb_scrollbar_thunk;
-}
-
-} // namespace thunk
-} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_scrollbar_api.h ('k') | ppapi/thunk/ppb_video_encoder_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698