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

Side by Side Diff: ppapi/thunk/ppb_view_thunk.cc

Issue 329033003: Add GetScrollOffset function to PPB_View (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/ppb_view_api.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // From ppb_view.idl modified Tue Aug 20 08:13:36 2013. 5 // From ppb_view.idl modified Wed Jun 11 15:42:26 2014.
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_view.h" 8 #include "ppapi/c/ppb_view.h"
9 #include "ppapi/shared_impl/tracked_callback.h" 9 #include "ppapi/shared_impl/tracked_callback.h"
10 #include "ppapi/thunk/enter.h" 10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/ppapi_thunk_export.h" 11 #include "ppapi/thunk/ppapi_thunk_export.h"
12 #include "ppapi/thunk/ppb_view_api.h" 12 #include "ppapi/thunk/ppb_view_api.h"
13 13
14 namespace ppapi { 14 namespace ppapi {
15 namespace thunk { 15 namespace thunk {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 float GetCSSScale(PP_Resource resource) { 73 float GetCSSScale(PP_Resource resource) {
74 VLOG(4) << "PPB_View::GetCSSScale()"; 74 VLOG(4) << "PPB_View::GetCSSScale()";
75 EnterResource<PPB_View_API> enter(resource, true); 75 EnterResource<PPB_View_API> enter(resource, true);
76 if (enter.failed()) 76 if (enter.failed())
77 return 0.0f; 77 return 0.0f;
78 return enter.object()->GetCSSScale(); 78 return enter.object()->GetCSSScale();
79 } 79 }
80 80
81 PP_Bool GetScrollOffset(PP_Resource resource, struct PP_Point* offset) {
82 VLOG(4) << "PPB_View::GetScrollOffset()";
83 EnterResource<PPB_View_API> enter(resource, true);
84 if (enter.failed())
85 return PP_FALSE;
86 return enter.object()->GetScrollOffset(offset);
87 }
88
81 const PPB_View_1_0 g_ppb_view_thunk_1_0 = { 89 const PPB_View_1_0 g_ppb_view_thunk_1_0 = {
82 &IsView, 90 &IsView,
83 &GetRect, 91 &GetRect,
84 &IsFullscreen, 92 &IsFullscreen,
85 &IsVisible, 93 &IsVisible,
86 &IsPageVisible, 94 &IsPageVisible,
87 &GetClipRect 95 &GetClipRect
88 }; 96 };
89 97
90 const PPB_View_1_1 g_ppb_view_thunk_1_1 = { 98 const PPB_View_1_1 g_ppb_view_thunk_1_1 = {
91 &IsView, 99 &IsView,
92 &GetRect, 100 &GetRect,
93 &IsFullscreen, 101 &IsFullscreen,
94 &IsVisible, 102 &IsVisible,
95 &IsPageVisible, 103 &IsPageVisible,
96 &GetClipRect, 104 &GetClipRect,
97 &GetDeviceScale, 105 &GetDeviceScale,
98 &GetCSSScale 106 &GetCSSScale
99 }; 107 };
100 108
109 const PPB_View_1_2 g_ppb_view_thunk_1_2 = {
110 &IsView,
111 &GetRect,
112 &IsFullscreen,
113 &IsVisible,
114 &IsPageVisible,
115 &GetClipRect,
116 &GetDeviceScale,
117 &GetCSSScale,
118 &GetScrollOffset
119 };
120
101 } // namespace 121 } // namespace
102 122
103 PPAPI_THUNK_EXPORT const PPB_View_1_0* GetPPB_View_1_0_Thunk() { 123 PPAPI_THUNK_EXPORT const PPB_View_1_0* GetPPB_View_1_0_Thunk() {
104 return &g_ppb_view_thunk_1_0; 124 return &g_ppb_view_thunk_1_0;
105 } 125 }
106 126
107 PPAPI_THUNK_EXPORT const PPB_View_1_1* GetPPB_View_1_1_Thunk() { 127 PPAPI_THUNK_EXPORT const PPB_View_1_1* GetPPB_View_1_1_Thunk() {
108 return &g_ppb_view_thunk_1_1; 128 return &g_ppb_view_thunk_1_1;
109 } 129 }
110 130
131 PPAPI_THUNK_EXPORT const PPB_View_1_2* GetPPB_View_1_2_Thunk() {
132 return &g_ppb_view_thunk_1_2;
133 }
134
111 } // namespace thunk 135 } // namespace thunk
112 } // namespace ppapi 136 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_view_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698