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

Side by Side Diff: ppapi/proxy/browser_font_singleton_resource.cc

Issue 11578038: Convert pepper font list to new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ppapi/proxy/browser_font_singleton_resource.h"
6
7 #include "ppapi/proxy/ppapi_messages.h"
8 #include "ppapi/shared_impl/var.h"
9
10 namespace ppapi {
11 namespace proxy {
12
13 BrowserFontSingletonResource::BrowserFontSingletonResource(
14 Connection connection,
15 PP_Instance instance)
16 : PluginResource(connection, instance) {
17 SendCreate(BROWSER, PpapiHostMsg_BrowserFontSingleton_Create());
18 }
19
20 BrowserFontSingletonResource::~BrowserFontSingletonResource() {
21 }
22
23 thunk::PPB_BrowserFont_Singleton_API*
24 BrowserFontSingletonResource::AsPPB_BrowserFont_Singleton_API() {
25 return this;
26 }
27
28 PP_Var BrowserFontSingletonResource::GetFontFamilies(PP_Instance instance) {
29 if (families_.empty()) {
30 SyncCall<PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply>(
31 BROWSER, PpapiHostMsg_BrowserFontSingleton_GetFontFamilies(),
32 &families_);
33 }
34 return StringVar::StringToPPVar(families_);
35 }
36
37 } // namespace proxy
38 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698