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

Side by Side Diff: ppapi/proxy/flash_resource.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
« no previous file with comments | « ppapi/host/resource_message_handler.cc ('k') | ppapi/proxy/flash_resource.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) 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_FLASH_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_FLASH_RESOURCE_H_
6 #define PPAPI_PROXY_FLASH_RESOURCE_H_ 6 #define PPAPI_PROXY_FLASH_RESOURCE_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_var.h" 9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/private/ppb_flash.h" 10 #include "ppapi/c/private/ppb_flash.h"
11 #include "ppapi/proxy/connection.h" 11 #include "ppapi/proxy/connection.h"
12 #include "ppapi/proxy/plugin_resource.h" 12 #include "ppapi/proxy/plugin_resource.h"
13 #include "ppapi/proxy/ppapi_proxy_export.h"
14 #include "ppapi/thunk/ppb_flash_functions_api.h" 13 #include "ppapi/thunk/ppb_flash_functions_api.h"
15 14
16 namespace ppapi { 15 namespace ppapi {
17 namespace proxy { 16 namespace proxy {
18 17
19 class PluginDispatcher; 18 class PluginDispatcher;
20 19
21 class PPAPI_PROXY_EXPORT FlashResource 20 class FlashResource
22 : public PluginResource, 21 : public PluginResource,
23 public NON_EXPORTED_BASE(thunk::PPB_Flash_Functions_API) { 22 public thunk::PPB_Flash_Functions_API {
24 public: 23 public:
25 FlashResource(Connection connection, 24 FlashResource(Connection connection,
26 PP_Instance instance, 25 PP_Instance instance,
27 PluginDispatcher* plugin_dispatcher); 26 PluginDispatcher* plugin_dispatcher);
28 virtual ~FlashResource(); 27 virtual ~FlashResource();
29 28
30 // Resource override. 29 // Resource override.
31 virtual thunk::PPB_Flash_Functions_API* AsPPB_Flash_Functions_API() OVERRIDE; 30 virtual thunk::PPB_Flash_Functions_API* AsPPB_Flash_Functions_API() OVERRIDE;
32 31
33 // PPB_Flash_Functions_API implementation. 32 // PPB_Flash_Functions_API implementation.
34 virtual PP_Var GetProxyForURL(PP_Instance instance, 33 virtual PP_Var GetProxyForURL(PP_Instance instance,
35 const std::string& url) OVERRIDE; 34 const std::string& url) OVERRIDE;
36 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; 35 virtual void UpdateActivity(PP_Instance instance) OVERRIDE;
37 virtual PP_Bool SetCrashData(PP_Instance instance, 36 virtual PP_Bool SetCrashData(PP_Instance instance,
38 PP_FlashCrashKey key, 37 PP_FlashCrashKey key,
39 PP_Var value) OVERRIDE; 38 PP_Var value) OVERRIDE;
40 virtual double GetLocalTimeZoneOffset(PP_Instance instance, 39 virtual double GetLocalTimeZoneOffset(PP_Instance instance,
41 PP_Time t) OVERRIDE; 40 PP_Time t) OVERRIDE;
42 virtual PP_Var GetSetting(PP_Instance instance, 41 virtual PP_Var GetSetting(PP_Instance instance,
43 PP_FlashSetting setting) OVERRIDE; 42 PP_FlashSetting setting) OVERRIDE;
43 virtual void SetInstanceAlwaysOnTop(PP_Instance instance,
44 PP_Bool on_top) OVERRIDE;
45 virtual PP_Bool DrawGlyphs(
46 PP_Instance instance,
47 PP_Resource pp_image_data,
48 const PP_BrowserFont_Trusted_Description* font_desc,
49 uint32_t color,
50 const PP_Point* position,
51 const PP_Rect* clip,
52 const float transformation[3][3],
53 PP_Bool allow_subpixel_aa,
54 uint32_t glyph_count,
55 const uint16_t glyph_indices[],
56 const PP_Point glyph_advances[]) OVERRIDE;
57 virtual int32_t Navigate(PP_Instance instance,
58 PP_Resource request_info,
59 const char* target,
60 PP_Bool from_user_action) OVERRIDE;
61 virtual PP_Bool IsRectTopmost(PP_Instance instance,
62 const PP_Rect* rect) OVERRIDE;
44 63
45 private: 64 private:
46 // Non-owning pointer to the PluginDispatcher that owns this object. 65 // Non-owning pointer to the PluginDispatcher that owns this object.
47 PluginDispatcher* plugin_dispatcher_; 66 PluginDispatcher* plugin_dispatcher_;
48 67
49 DISALLOW_COPY_AND_ASSIGN(FlashResource); 68 DISALLOW_COPY_AND_ASSIGN(FlashResource);
50 }; 69 };
51 70
52 } // namespace proxy 71 } // namespace proxy
53 } // namespace ppapi 72 } // namespace ppapi
54 73
55 #endif // PPAPI_PROXY_FLASH_RESOURCE_H_ 74 #endif // PPAPI_PROXY_FLASH_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/host/resource_message_handler.cc ('k') | ppapi/proxy/flash_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698