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

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

Issue 11578038: Convert pepper font list to new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 years 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_browser_font_singleton_api.h ('k') | ppapi/thunk/ppb_instance_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) 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 #include "ppapi/thunk/thunk.h" 5 #include "ppapi/thunk/thunk.h"
6 #include "ppapi/thunk/enter.h" 6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/ppb_browser_font_singleton_api.h"
7 #include "ppapi/thunk/ppb_browser_font_trusted_api.h" 8 #include "ppapi/thunk/ppb_browser_font_trusted_api.h"
8 #include "ppapi/thunk/resource_creation_api.h" 9 #include "ppapi/thunk/resource_creation_api.h"
9 10
10 namespace ppapi { 11 namespace ppapi {
11 namespace thunk { 12 namespace thunk {
12 13
13 namespace { 14 namespace {
14 15
15 typedef EnterResource<PPB_BrowserFont_Trusted_API> EnterBrowserFont; 16 typedef EnterResource<PPB_BrowserFont_Trusted_API> EnterBrowserFont;
16 17
17 PP_Var GetFontFamilies(PP_Instance instance) { 18 PP_Var GetFontFamilies(PP_Instance instance) {
18 EnterInstance enter(instance); 19 EnterInstanceAPI<PPB_BrowserFont_Singleton_API> enter(instance);
19 if (enter.failed()) 20 if (enter.failed())
20 return PP_MakeUndefined(); 21 return PP_MakeUndefined();
21 return enter.functions()->GetFontFamilies(instance); 22 return enter.functions()->GetFontFamilies(instance);
22 } 23 }
23 24
24 PP_Resource Create(PP_Instance instance, 25 PP_Resource Create(PP_Instance instance,
25 const PP_BrowserFont_Trusted_Description* description) { 26 const PP_BrowserFont_Trusted_Description* description) {
26 EnterResourceCreation enter(instance); 27 EnterResourceCreation enter(instance);
27 if (enter.failed()) 28 if (enter.failed())
28 return 0; 29 return 0;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 }; 96 };
96 97
97 } // namespace 98 } // namespace
98 99
99 const PPB_BrowserFont_Trusted_1_0* GetPPB_BrowserFont_Trusted_1_0_Thunk() { 100 const PPB_BrowserFont_Trusted_1_0* GetPPB_BrowserFont_Trusted_1_0_Thunk() {
100 return &g_ppb_browser_font_trusted_thunk; 101 return &g_ppb_browser_font_trusted_thunk;
101 } 102 }
102 103
103 } // namespace thunk 104 } // namespace thunk
104 } // namespace ppapi 105 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_browser_font_singleton_api.h ('k') | ppapi/thunk/ppb_instance_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698