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

Unified Diff: content/browser/renderer_host/fontmgr_message_filter.h

Issue 132113015: IPC interface for font management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Match final interface and cleanup usage. Created 6 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
Index: content/browser/renderer_host/fontmgr_message_filter.h
===================================================================
--- content/browser/renderer_host/fontmgr_message_filter.h (revision 0)
+++ content/browser/renderer_host/fontmgr_message_filter.h (working copy)
@@ -0,0 +1,69 @@
+// 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_BROWSER_RENDERER_HOST_FONTMGR_MESSAGE_FILTER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_FONTMGR_MESSAGE_FILTER_H_
+
+#include "base/basictypes.h"
+#include "content/public/browser/browser_message_filter.h"
+#include "skia/ext/refptr.h"
+#include "third_party/skia/include/ports/SkFontStyle.h"
+
+struct SkFontIdentity;
+
+class SkDataTable;
+class SkRemotableFontIdentitySet;
+class SkRemotableFontMgr;
+class SkStreamAsset;
+
+namespace IPC {
+template<class T> class Optional;
+} // namespace
+
+namespace content {
+
+class FontMgrMessageFilter : public BrowserMessageFilter {
+ public:
+ explicit FontMgrMessageFilter(
+ const skia::RefPtr<SkRemotableFontMgr>& font_manager);
+
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok) OVERRIDE;
+
+ private:
+ virtual ~FontMgrMessageFilter();
+
+ void OnFontMsg_GetFamilyNames(skia::RefPtr<SkDataTable>* family_names);
+
+ void OnFontMsg_GetIndex(int familyIndex,
+ skia::RefPtr<SkRemotableFontIdentitySet>* styles);
+
+ void OnFontMsg_MatchIndexStyle(int family_index,
+ SkFontStyle style,
+ SkFontIdentity* identity);
+
+ void OnFontMsg_MatchName(IPC::Optional<std::string> family_name,
+ skia::RefPtr<SkRemotableFontIdentitySet>* styles);
+
+ void OnFontMsg_MatchNameStyle(IPC::Optional<std::string> family_name,
+ SkFontStyle style,
+ SkFontIdentity* identity);
+
+ void OnFontMsg_MatchNameStyleCharacter(IPC::Optional<std::string> family_name,
+ SkFontStyle style,
+ IPC::Optional<std::string> bpc47,
+ SkUnichar character,
+ SkFontIdentity* identity);
+
+ void OnFontMsg_GetData(uint32_t data_id,
+ skia::RefPtr<SkStreamAsset>* font_data);
+
+ skia::RefPtr<SkRemotableFontMgr> font_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(FontMgrMessageFilter);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_FONTMGR_MESSAGE_FILTER_H_
« no previous file with comments | « no previous file | content/browser/renderer_host/fontmgr_message_filter.cc » ('j') | content/common/fontmgr_messages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698