Delete unused downloads page asset.
[chromium-blink-merge.git] / ppapi / proxy / browser_font_singleton_resource.cc
blob0805126d2ca375bcab1ef36cf823e44ccd1c52ba
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.
5 #include "ppapi/proxy/browser_font_singleton_resource.h"
7 #include "ppapi/proxy/ppapi_messages.h"
8 #include "ppapi/shared_impl/var.h"
10 namespace ppapi {
11 namespace proxy {
13 BrowserFontSingletonResource::BrowserFontSingletonResource(
14 Connection connection,
15 PP_Instance instance)
16 : PluginResource(connection, instance) {
17 SendCreate(BROWSER, PpapiHostMsg_BrowserFontSingleton_Create());
20 BrowserFontSingletonResource::~BrowserFontSingletonResource() {
23 thunk::PPB_BrowserFont_Singleton_API*
24 BrowserFontSingletonResource::AsPPB_BrowserFont_Singleton_API() {
25 return this;
28 PP_Var BrowserFontSingletonResource::GetFontFamilies(PP_Instance instance) {
29 if (families_.empty()) {
30 SyncCall<PpapiPluginMsg_BrowserFontSingleton_GetFontFamiliesReply>(
31 BROWSER, PpapiHostMsg_BrowserFontSingleton_GetFontFamilies(),
32 &families_);
34 return StringVar::StringToPPVar(families_);
37 } // namespace proxy
38 } // namespace ppapi