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

Side by Side Diff: ppapi/proxy/ppb_font_proxy.h

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_flash_tcp_socket_proxy.cc ('k') | ppapi/proxy/ppb_font_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PPAPI_PROXY_PPB_FONT_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_FONT_PROXY_H_
6 #define PPAPI_PROXY_PPB_FONT_PROXY_H_ 6 #define PPAPI_PROXY_PPB_FONT_PROXY_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "ppapi/proxy/interface_proxy.h" 10 #include "ppapi/proxy/interface_proxy.h"
11 #include "ppapi/shared_impl/function_group_base.h" 11 #include "ppapi/shared_impl/function_group_base.h"
12 #include "ppapi/shared_impl/host_resource.h" 12 #include "ppapi/shared_impl/host_resource.h"
13 #include "ppapi/shared_impl/resource.h" 13 #include "ppapi/shared_impl/resource.h"
14 #include "ppapi/shared_impl/webkit_forwarding.h" 14 #include "ppapi/shared_impl/webkit_forwarding.h"
15 #include "ppapi/thunk/ppb_font_api.h" 15 #include "ppapi/thunk/ppb_font_api.h"
16 16
17 struct PPB_Font_Dev; 17 struct PPB_Font_Dev;
18 18
19 namespace ppapi { 19 namespace ppapi {
20 namespace proxy { 20 namespace proxy {
21 21
22 class SerializedVarReturnValue; 22 class SerializedVarReturnValue;
23 23
24 class PPB_Font_Proxy : public ppapi::FunctionGroupBase, 24 class PPB_Font_Proxy : public InterfaceProxy,
25 public ppapi::thunk::PPB_Font_FunctionAPI, 25 public ppapi::thunk::PPB_Font_FunctionAPI {
26 public InterfaceProxy {
27 public: 26 public:
28 PPB_Font_Proxy(Dispatcher* dispatcher, const void* target_interface); 27 PPB_Font_Proxy(Dispatcher* dispatcher);
29 virtual ~PPB_Font_Proxy(); 28 virtual ~PPB_Font_Proxy();
30 29
31 static const Info* GetInfo();
32
33 // FunctionGroupBase overrides. 30 // FunctionGroupBase overrides.
34 virtual ppapi::thunk::PPB_Font_FunctionAPI* AsPPB_Font_FunctionAPI() OVERRIDE; 31 virtual ppapi::thunk::PPB_Font_FunctionAPI* AsPPB_Font_FunctionAPI() OVERRIDE;
35 32
36 // PPB_Font_FunctionAPI implementation. 33 // PPB_Font_FunctionAPI implementation.
37 virtual PP_Var GetFontFamilies(PP_Instance instance) OVERRIDE; 34 virtual PP_Var GetFontFamilies(PP_Instance instance) OVERRIDE;
38 35
39 // InterfaceProxy implementation. 36 // InterfaceProxy implementation.
40 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 37 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
41 38
39 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_FONT;
40
42 private: 41 private:
43 DISALLOW_COPY_AND_ASSIGN(PPB_Font_Proxy); 42 DISALLOW_COPY_AND_ASSIGN(PPB_Font_Proxy);
44 }; 43 };
45 44
46 class Font : public ppapi::Resource, 45 class Font : public ppapi::Resource,
47 public ppapi::thunk::PPB_Font_API { 46 public ppapi::thunk::PPB_Font_API {
48 public: 47 public:
49 // Note that there isn't a "real" resource in the renderer backing a font, 48 // Note that there isn't a "real" resource in the renderer backing a font,
50 // it lives entirely in the plugin process. So the resource ID in the host 49 // it lives entirely in the plugin process. So the resource ID in the host
51 // resource should be 0. However, various code assumes the instance in the 50 // resource should be 0. However, various code assumes the instance in the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // destruction). 87 // destruction).
89 ppapi::WebKitForwarding::Font* font_forwarding_; 88 ppapi::WebKitForwarding::Font* font_forwarding_;
90 89
91 DISALLOW_COPY_AND_ASSIGN(Font); 90 DISALLOW_COPY_AND_ASSIGN(Font);
92 }; 91 };
93 92
94 } // namespace proxy 93 } // namespace proxy
95 } // namespace ppapi 94 } // namespace ppapi
96 95
97 #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_ 96 #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_flash_tcp_socket_proxy.cc ('k') | ppapi/proxy/ppb_font_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698