| 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_
|
|
|