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

Side by Side Diff: chrome/renderer/pepper/pepper_flash_font_file_host.h

Issue 1416643002: Enable pp::flash::FontFile support on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Based generated thunk files Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_ 5 #ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
6 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_ 6 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ppapi/c/private/pp_private_font_charset.h" 10 #include "ppapi/c/private/pp_private_font_charset.h"
11 #include "ppapi/host/resource_host.h" 11 #include "ppapi/host/resource_host.h"
12 12
13 #if defined(OS_LINUX) || defined(OS_OPENBSD) 13 #if defined(OS_LINUX) || defined(OS_OPENBSD)
14 #include "base/files/scoped_file.h" 14 #include "base/files/scoped_file.h"
15 #elif defined(OS_WIN)
16 #include "skia/ext/refptr.h"
17 #include "third_party/skia/include/core/SkTypeface.h"
15 #endif 18 #endif
16 19
17 namespace content { 20 namespace content {
18 class RendererPpapiHost; 21 class RendererPpapiHost;
19 } 22 }
20 23
21 namespace ppapi { 24 namespace ppapi {
22 namespace proxy { 25 namespace proxy {
23 struct SerializedFontDescription; 26 struct SerializedFontDescription;
24 } 27 }
25 } 28 }
26 29
27 class PepperFlashFontFileHost : public ppapi::host::ResourceHost { 30 class PepperFlashFontFileHost : public ppapi::host::ResourceHost {
28 public: 31 public:
29 PepperFlashFontFileHost( 32 PepperFlashFontFileHost(
30 content::RendererPpapiHost* host, 33 content::RendererPpapiHost* host,
31 PP_Instance instance, 34 PP_Instance instance,
32 PP_Resource resource, 35 PP_Resource resource,
33 const ppapi::proxy::SerializedFontDescription& description, 36 const ppapi::proxy::SerializedFontDescription& description,
34 PP_PrivateFontCharset charset); 37 PP_PrivateFontCharset charset);
35 ~PepperFlashFontFileHost() override; 38 ~PepperFlashFontFileHost() override;
36 39
37 int32_t OnResourceMessageReceived( 40 int32_t OnResourceMessageReceived(
38 const IPC::Message& msg, 41 const IPC::Message& msg,
39 ppapi::host::HostMessageContext* context) override; 42 ppapi::host::HostMessageContext* context) override;
40 43
41 private: 44 private:
42 int32_t OnGetFontTable(ppapi::host::HostMessageContext* context, 45 int32_t OnGetFontTable(ppapi::host::HostMessageContext* context,
43 uint32_t table); 46 uint32_t table);
47 bool GetFontData(uint32_t table, void* buffer, size_t* length);
44 48
45 #if defined(OS_LINUX) || defined(OS_OPENBSD) 49 #if defined(OS_LINUX) || defined(OS_OPENBSD)
46 base::ScopedFD fd_; 50 base::ScopedFD fd_;
51 #elif defined(OS_WIN)
52 skia::RefPtr<SkTypeface> typeface_;
47 #endif 53 #endif
48 54
49 DISALLOW_COPY_AND_ASSIGN(PepperFlashFontFileHost); 55 DISALLOW_COPY_AND_ASSIGN(PepperFlashFontFileHost);
50 }; 56 };
51 57
52 #endif // CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_ 58 #endif // CHROME_RENDERER_PEPPER_PEPPER_FLASH_FONT_FILE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698