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

Side by Side Diff: ppapi/shared_impl/resource_object_base.h

Issue 6905088: New thunk system for Pepper proxy and implementation (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PPAPI_SHARED_IMPL_RESOURCE_OBJECT_BASE_H_
6 #define PPAPI_SHARED_IMPL_RESOURCE_OBJECT_BASE_H_
7
8 namespace ppapi {
9
10 namespace thunk {
11 class PPB_Graphics2D_API;
12 class PPB_ImageData_API;
13 }
14
15 namespace shared_impl {
16
17 class ResourceObjectBase {
18 public:
19
20 virtual thunk::PPB_Graphics2D_API* AsGraphics2D_API() { return NULL; }
21 virtual thunk::PPB_ImageData_API* AsImageData_API() { return NULL; }
22
23 template <typename T> T* GetAs() { return NULL; }
24 };
25
26 template<>
27 inline thunk::PPB_Graphics2D_API* ResourceObjectBase::GetAs() {
28 return AsGraphics2D_API();
29 }
30 template<>
31 inline thunk::PPB_ImageData_API* ResourceObjectBase::GetAs() {
32 return AsImageData_API();
33 }
34
35 } // namespace shared_impl
36 } // namespace ppapi
37
38 #endif // PPAPI_SHARED_IMPL_RESOURCE_OBJECT_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698