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

Unified Diff: ppapi/proxy/truetype_font_singleton_resource.h

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_aura. Pango headers missing. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/truetype_font_resource.cc ('k') | ppapi/proxy/truetype_font_singleton_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/truetype_font_singleton_resource.h
diff --git a/ppapi/proxy/truetype_font_singleton_resource.h b/ppapi/proxy/truetype_font_singleton_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..03c9c7d321717a7be333c3dddb6ca9f07201e337
--- /dev/null
+++ b/ppapi/proxy/truetype_font_singleton_resource.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
+#define PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
+
+#include <string>
+#include <vector>
+
+#include "ppapi/proxy/connection.h"
+#include "ppapi/proxy/plugin_resource.h"
+#include "ppapi/thunk/ppb_truetype_font_singleton_api.h"
+
+namespace ppapi {
+
+class TrackedCallback;
+
+namespace proxy {
+
+struct SerializedTrueTypeFontDescription;
+
+// This handles the singleton calls (that don't take a PP_Resource parameter)
+// on the TrueType font interface.
+class TrueTypeFontSingletonResource
+ : public PluginResource,
+ public thunk::PPB_TrueTypeFont_Singleton_API {
+ public:
+ TrueTypeFontSingletonResource(Connection connection, PP_Instance instance);
+ virtual ~TrueTypeFontSingletonResource();
+
+ // Resource override.
+ virtual thunk::PPB_TrueTypeFont_Singleton_API*
+ AsPPB_TrueTypeFont_Singleton_API() OVERRIDE;
+
+ // thunk::PPB_TrueTypeFont_Singleton_API implementation.
+ virtual int32_t GetFontFamilies(
+ PP_Instance instance,
+ const PP_ArrayOutput& output,
+ const scoped_refptr<TrackedCallback>& callback) OVERRIDE;
+
+ private:
+ void OnPluginMsgGetFontFamiliesComplete(
+ scoped_refptr<TrackedCallback> callback,
+ PP_ArrayOutput array_output,
+ const ResourceMessageReplyParams& params,
+ const std::vector<std::string>& data);
+
+ DISALLOW_COPY_AND_ASSIGN(TrueTypeFontSingletonResource);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
« no previous file with comments | « ppapi/proxy/truetype_font_resource.cc ('k') | ppapi/proxy/truetype_font_singleton_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698