Index: content/common/fontmgr_proxy.h |
=================================================================== |
--- content/common/fontmgr_proxy.h (revision 0) |
+++ content/common/fontmgr_proxy.h (working copy) |
@@ -0,0 +1,45 @@ |
+// Copyright (c) 2014 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 CONTENT_COMMON_FONTMGR_PROXY_H |
brettw
2014/03/11 21:38:15
Can this file be in content/renderer? I think if w
bungeman-chromium
2014/03/13 22:33:31
Done. Hmmm... yes. As of right now the only user w
|
+#define CONTENT_COMMON_FONTMGR_PROXY_H |
+ |
+#include "base/values.h" |
+#include "content/renderer/render_thread_impl.h" |
+#include "third_party/skia/include/ports/SkFontMgr_indirect.h" |
+ |
+class SkData; |
+class SkDataTable; |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT FontMgrProxy : public SkRemotableFontMgr { |
+ public: |
+ // If we support multiple of these at the same time, this constructor |
+ // could take a parameter stating which one to talk to. |
+ // There could even be some statics for getting the available ones. |
+ FontMgrProxy() { } |
+ virtual ~FontMgrProxy() { } |
+ |
+ virtual SkDataTable* getFamilyNames() const OVERRIDE; |
+ virtual SkRemotableFontIdentitySet* getIndexIdentities(int index) const OVERRIDE; |
brettw
2014/03/11 21:38:15
Long lines (in this case I'd normally just wrap th
bungeman-chromium
2014/03/13 22:33:31
Done.
|
+ virtual SkFontIdentity matchIndexStyle(int familyIndex, const SkFontStyle&) const OVERRIDE; |
+ |
+ virtual SkRemotableFontIdentitySet* matchName(const char familyName[]) const OVERRIDE; |
+ virtual SkFontIdentity matchNameStyle(const char familyName[], const SkFontStyle&) const OVERRIDE; |
+ virtual SkFontIdentity matchNameStyleCharacter(const char familyName[], |
+ const SkFontStyle&, |
+ const char bpc47[], |
+ uint32_t character) const |
+ OVERRIDE; |
+ |
+ virtual SkStream* getData(int dataId) const OVERRIDE; |
+ |
+ private: |
+ typedef SkRemotableFontMgr INHERITED; |
brettw
2014/03/11 21:38:15
I'm not sure what this is for.
bungeman-chromium
2014/03/13 22:33:31
Done. Left-over from the initial implementation. S
|
+}; |
+ |
+} // namespace content |
+ |
+#endif // SKIA_EXT_FONTMGR_PROXY_H |