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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_FLASH_RESOURCE_H_
6 #define PPAPI_PROXY_FLASH_RESOURCE_H_
8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/private/ppb_flash.h"
11 #include "ppapi/proxy/connection.h"
12 #include "ppapi/proxy/plugin_resource.h"
13 #include "ppapi/thunk/ppb_flash_functions_api.h"
18 class PluginDispatcher
;
21 : public PluginResource
,
22 public thunk::PPB_Flash_Functions_API
{
24 FlashResource(Connection connection
,
26 PluginDispatcher
* plugin_dispatcher
);
27 virtual ~FlashResource();
30 virtual thunk::PPB_Flash_Functions_API
* AsPPB_Flash_Functions_API() OVERRIDE
;
32 // PPB_Flash_Functions_API implementation.
33 virtual PP_Var
GetProxyForURL(PP_Instance instance
,
34 const std::string
& url
) OVERRIDE
;
35 virtual void UpdateActivity(PP_Instance instance
) OVERRIDE
;
36 virtual PP_Bool
SetCrashData(PP_Instance instance
,
38 PP_Var value
) OVERRIDE
;
39 virtual double GetLocalTimeZoneOffset(PP_Instance instance
,
41 virtual PP_Var
GetSetting(PP_Instance instance
,
42 PP_FlashSetting setting
) OVERRIDE
;
43 virtual void SetInstanceAlwaysOnTop(PP_Instance instance
,
44 PP_Bool on_top
) OVERRIDE
;
45 virtual PP_Bool
DrawGlyphs(
47 PP_Resource pp_image_data
,
48 const PP_BrowserFont_Trusted_Description
* font_desc
,
50 const PP_Point
* position
,
52 const float transformation
[3][3],
53 PP_Bool allow_subpixel_aa
,
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
,
60 PP_Bool from_user_action
) OVERRIDE
;
61 virtual PP_Bool
IsRectTopmost(PP_Instance instance
,
62 const PP_Rect
* rect
) OVERRIDE
;
63 virtual void InvokePrinting(PP_Instance instance
) OVERRIDE
;
66 // Non-owning pointer to the PluginDispatcher that owns this object.
67 PluginDispatcher
* plugin_dispatcher_
;
69 DISALLOW_COPY_AND_ASSIGN(FlashResource
);
75 #endif // PPAPI_PROXY_FLASH_RESOURCE_H_