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

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

Issue 7044012: Support getting the font list in Pepper. This currently only works out of (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
« no previous file with comments | « ppapi/proxy/ppb_font_proxy.cc ('k') | ppapi/thunk/ppb_font_api.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 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 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 #ifndef PPAPI_SHARED_IMPL_FUNCTION_GROUP_BASE_H_ 5 #ifndef PPAPI_SHARED_IMPL_FUNCTION_GROUP_BASE_H_
6 #define PPAPI_SHARED_IMPL_FUNCTION_GROUP_BASE_H_ 6 #define PPAPI_SHARED_IMPL_FUNCTION_GROUP_BASE_H_
7 7
8 namespace ppapi { 8 namespace ppapi {
9 9
10 namespace thunk { 10 namespace thunk {
11 class PPB_Font_FunctionAPI;
11 class ResourceCreationAPI; 12 class ResourceCreationAPI;
12 } 13 }
13 14
14 class FunctionGroupBase { 15 class FunctionGroupBase {
15 public: 16 public:
16 // Dynamic casting for this object. Returns the pointer to the given type if 17 // Dynamic casting for this object. Returns the pointer to the given type if
17 // it's supported. 18 // it's supported.
19 virtual thunk::PPB_Font_FunctionAPI* AsFont_FunctionAPI() { return NULL; }
18 virtual thunk::ResourceCreationAPI* AsResourceCreation() { return NULL; } 20 virtual thunk::ResourceCreationAPI* AsResourceCreation() { return NULL; }
19 21
20 template <typename T> T* GetAs() { return NULL; } 22 template <typename T> T* GetAs() { return NULL; }
21 }; 23 };
22 24
23 template<> 25 template<>
26 inline thunk::PPB_Font_FunctionAPI* FunctionGroupBase::GetAs() {
27 return AsFont_FunctionAPI();
28 }
29 template<>
24 inline ppapi::thunk::ResourceCreationAPI* FunctionGroupBase::GetAs() { 30 inline ppapi::thunk::ResourceCreationAPI* FunctionGroupBase::GetAs() {
25 return AsResourceCreation(); 31 return AsResourceCreation();
26 } 32 }
27 33
28 } // namespace ppapi 34 } // namespace ppapi
29 35
30 #endif // PPAPI_SHARED_IMPL_FUNCTION_GROUP_BASE_H_ 36 #endif // PPAPI_SHARED_IMPL_FUNCTION_GROUP_BASE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_font_proxy.cc ('k') | ppapi/thunk/ppb_font_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698