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

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

Issue 11510008: Refactor 4 PPB_Flash functions to the new PPAPI resource model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
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 PPAPI_PROXY_PPB_FLASH_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_FLASH_PROXY_H_
6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_ 6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // This flash proxy also proxies the PPB_Flash_Print interface. This one 43 // This flash proxy also proxies the PPB_Flash_Print interface. This one
44 // doesn't use the regular thunk system because the _impl side is actually in 44 // doesn't use the regular thunk system because the _impl side is actually in
45 // Chrome rather than with the rest of the interface implementations. 45 // Chrome rather than with the rest of the interface implementations.
46 static const PPB_Flash_Print_1_0* GetFlashPrintInterface(); 46 static const PPB_Flash_Print_1_0* GetFlashPrintInterface();
47 47
48 // InterfaceProxy implementation. 48 // InterfaceProxy implementation.
49 virtual bool OnMessageReceived(const IPC::Message& msg); 49 virtual bool OnMessageReceived(const IPC::Message& msg);
50 50
51 // PPB_Flash_API implementation. 51 // PPB_Flash_API implementation.
52 virtual void SetInstanceAlwaysOnTop(PP_Instance instance,
53 PP_Bool on_top) OVERRIDE;
54 virtual PP_Bool DrawGlyphs(
55 PP_Instance instance,
56 PP_Resource pp_image_data,
57 const PP_BrowserFont_Trusted_Description* font_desc,
58 uint32_t color,
59 const PP_Point* position,
60 const PP_Rect* clip,
61 const float transformation[3][3],
62 PP_Bool allow_subpixel_aa,
63 uint32_t glyph_count,
64 const uint16_t glyph_indices[],
65 const PP_Point glyph_advances[]) OVERRIDE;
66 virtual int32_t Navigate(PP_Instance instance,
67 PP_Resource request_info,
68 const char* target,
69 PP_Bool from_user_action) OVERRIDE;
70 virtual int32_t Navigate(PP_Instance instance,
71 const URLRequestInfoData& data,
72 const char* target,
73 PP_Bool from_user_action) OVERRIDE;
74 virtual double GetLocalTimeZoneOffset(PP_Instance instance, 52 virtual double GetLocalTimeZoneOffset(PP_Instance instance,
75 PP_Time t) OVERRIDE; 53 PP_Time t) OVERRIDE;
76 virtual PP_Bool IsRectTopmost(PP_Instance instance,
77 const PP_Rect* rect) OVERRIDE;
78 virtual PP_Var GetSetting(PP_Instance instance, 54 virtual PP_Var GetSetting(PP_Instance instance,
79 PP_FlashSetting setting) OVERRIDE; 55 PP_FlashSetting setting) OVERRIDE;
80 56
81 static const ApiID kApiID = API_ID_PPB_FLASH; 57 static const ApiID kApiID = API_ID_PPB_FLASH;
82 58
83 private: 59 private:
84 // Message handlers. 60 // Message handlers.
85 void OnHostMsgSetInstanceAlwaysOnTop(PP_Instance instance, 61 void OnHostMsgGetLocalTimeZoneOffset(PP_Instance instance,
86 PP_Bool on_top); 62 PP_Time t,
87 void OnHostMsgDrawGlyphs(PP_Instance instance,
88 const PPBFlash_DrawGlyphs_Params& params,
89 PP_Bool* result);
90 void OnHostMsgNavigate(PP_Instance instance,
91 const URLRequestInfoData& data,
92 const std::string& target,
93 PP_Bool from_user_action,
94 int32_t* result);
95 void OnHostMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t,
96 double* result); 63 double* result);
97 void OnHostMsgIsRectTopmost(PP_Instance instance,
98 PP_Rect rect,
99 PP_Bool* result);
100 void OnHostMsgGetSetting(PP_Instance instance, 64 void OnHostMsgGetSetting(PP_Instance instance,
101 PP_FlashSetting setting, 65 PP_FlashSetting setting,
102 SerializedVarReturnValue result); 66 SerializedVarReturnValue result);
103 void OnHostMsgInvokePrinting(PP_Instance instance); 67 void OnHostMsgInvokePrinting(PP_Instance instance);
104 68
105 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); 69 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy);
106 }; 70 };
107 71
108 } // namespace proxy 72 } // namespace proxy
109 } // namespace ppapi 73 } // namespace ppapi
110 74
111 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ 75 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698