blob: df2177824ff1c683e7d20e00c00c589b3933ac0b [file] [log] [blame]
[email protected]11d0c362012-10-11 02:02:111// 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.
4
5#ifndef PPAPI_PROXY_FLASH_RESOURCE_H_
6#define PPAPI_PROXY_FLASH_RESOURCE_H_
7
avie029c4132015-12-23 06:45:228#include <stdint.h>
9
10#include "base/macros.h"
[email protected]a9f2a6212012-12-04 08:47:3411#include "ppapi/c/pp_instance.h"
12#include "ppapi/c/pp_var.h"
13#include "ppapi/c/private/ppb_flash.h"
[email protected]11d0c362012-10-11 02:02:1114#include "ppapi/proxy/connection.h"
15#include "ppapi/proxy/plugin_resource.h"
[email protected]11d0c362012-10-11 02:02:1116#include "ppapi/thunk/ppb_flash_functions_api.h"
17
[email protected]11d0c362012-10-11 02:02:1118namespace ppapi {
19namespace proxy {
20
[email protected]db16e6d2012-12-19 03:32:5721class PluginDispatcher;
22
[email protected]24f40c12012-12-19 20:17:4223class FlashResource
[email protected]11d0c362012-10-11 02:02:1124 : public PluginResource,
[email protected]24f40c12012-12-19 20:17:4225 public thunk::PPB_Flash_Functions_API {
[email protected]11d0c362012-10-11 02:02:1126 public:
[email protected]db16e6d2012-12-19 03:32:5727 FlashResource(Connection connection,
28 PP_Instance instance,
29 PluginDispatcher* plugin_dispatcher);
nicke4784432015-04-23 14:01:4830 ~FlashResource() override;
[email protected]11d0c362012-10-11 02:02:1131
[email protected]a9f2a6212012-12-04 08:47:3432 // Resource override.
nicke4784432015-04-23 14:01:4833 thunk::PPB_Flash_Functions_API* AsPPB_Flash_Functions_API() override;
[email protected]11d0c362012-10-11 02:02:1134
[email protected]a9f2a6212012-12-04 08:47:3435 // PPB_Flash_Functions_API implementation.
nicke4784432015-04-23 14:01:4836 PP_Var GetProxyForURL(PP_Instance instance, const std::string& url) override;
37 void UpdateActivity(PP_Instance instance) override;
38 PP_Bool SetCrashData(PP_Instance instance,
39 PP_FlashCrashKey key,
40 PP_Var value) override;
41 double GetLocalTimeZoneOffset(PP_Instance instance, PP_Time t) override;
42 PP_Var GetSetting(PP_Instance instance, PP_FlashSetting setting) override;
43 void SetInstanceAlwaysOnTop(PP_Instance instance, PP_Bool on_top) override;
44 PP_Bool DrawGlyphs(
[email protected]24f40c12012-12-19 20:17:4245 PP_Instance instance,
46 PP_Resource pp_image_data,
47 const PP_BrowserFont_Trusted_Description* font_desc,
48 uint32_t color,
49 const PP_Point* position,
50 const PP_Rect* clip,
51 const float transformation[3][3],
52 PP_Bool allow_subpixel_aa,
53 uint32_t glyph_count,
54 const uint16_t glyph_indices[],
mostynb699af3c2014-10-06 18:03:3455 const PP_Point glyph_advances[]) override;
nicke4784432015-04-23 14:01:4856 int32_t Navigate(PP_Instance instance,
57 PP_Resource request_info,
58 const char* target,
59 PP_Bool from_user_action) override;
60 PP_Bool IsRectTopmost(PP_Instance instance, const PP_Rect* rect) override;
61 void InvokePrinting(PP_Instance instance) override;
[email protected]c92465382012-12-17 23:51:2162
[email protected]11d0c362012-10-11 02:02:1163 private:
[email protected]db16e6d2012-12-19 03:32:5764 // Non-owning pointer to the PluginDispatcher that owns this object.
65 PluginDispatcher* plugin_dispatcher_;
66
[email protected]11d0c362012-10-11 02:02:1167 DISALLOW_COPY_AND_ASSIGN(FlashResource);
68};
69
70} // namespace proxy
71} // namespace ppapi
72
73#endif // PPAPI_PROXY_FLASH_RESOURCE_H_