blob: 21cdbb73bce4b96eff759e3c19d493deade2625a [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
[email protected]a9f2a6212012-12-04 08:47:348#include "ppapi/c/pp_instance.h"
9#include "ppapi/c/pp_var.h"
10#include "ppapi/c/private/ppb_flash.h"
[email protected]11d0c362012-10-11 02:02:1111#include "ppapi/proxy/connection.h"
12#include "ppapi/proxy/plugin_resource.h"
[email protected]11d0c362012-10-11 02:02:1113#include "ppapi/thunk/ppb_flash_functions_api.h"
14
[email protected]11d0c362012-10-11 02:02:1115namespace ppapi {
16namespace proxy {
17
[email protected]db16e6d2012-12-19 03:32:5718class PluginDispatcher;
19
[email protected]24f40c12012-12-19 20:17:4220class FlashResource
[email protected]11d0c362012-10-11 02:02:1121 : public PluginResource,
[email protected]24f40c12012-12-19 20:17:4222 public thunk::PPB_Flash_Functions_API {
[email protected]11d0c362012-10-11 02:02:1123 public:
[email protected]db16e6d2012-12-19 03:32:5724 FlashResource(Connection connection,
25 PP_Instance instance,
26 PluginDispatcher* plugin_dispatcher);
nicke4784432015-04-23 14:01:4827 ~FlashResource() override;
[email protected]11d0c362012-10-11 02:02:1128
[email protected]a9f2a6212012-12-04 08:47:3429 // Resource override.
nicke4784432015-04-23 14:01:4830 thunk::PPB_Flash_Functions_API* AsPPB_Flash_Functions_API() override;
[email protected]11d0c362012-10-11 02:02:1131
[email protected]a9f2a6212012-12-04 08:47:3432 // PPB_Flash_Functions_API implementation.
nicke4784432015-04-23 14:01:4833 PP_Var GetProxyForURL(PP_Instance instance, const std::string& url) override;
34 void UpdateActivity(PP_Instance instance) override;
35 PP_Bool SetCrashData(PP_Instance instance,
36 PP_FlashCrashKey key,
37 PP_Var value) override;
38 double GetLocalTimeZoneOffset(PP_Instance instance, PP_Time t) override;
39 PP_Var GetSetting(PP_Instance instance, PP_FlashSetting setting) override;
40 void SetInstanceAlwaysOnTop(PP_Instance instance, PP_Bool on_top) override;
41 PP_Bool DrawGlyphs(
[email protected]24f40c12012-12-19 20:17:4242 PP_Instance instance,
43 PP_Resource pp_image_data,
44 const PP_BrowserFont_Trusted_Description* font_desc,
45 uint32_t color,
46 const PP_Point* position,
47 const PP_Rect* clip,
48 const float transformation[3][3],
49 PP_Bool allow_subpixel_aa,
50 uint32_t glyph_count,
51 const uint16_t glyph_indices[],
mostynb699af3c2014-10-06 18:03:3452 const PP_Point glyph_advances[]) override;
nicke4784432015-04-23 14:01:4853 int32_t Navigate(PP_Instance instance,
54 PP_Resource request_info,
55 const char* target,
56 PP_Bool from_user_action) override;
57 PP_Bool IsRectTopmost(PP_Instance instance, const PP_Rect* rect) override;
58 void InvokePrinting(PP_Instance instance) override;
[email protected]c92465382012-12-17 23:51:2159
[email protected]11d0c362012-10-11 02:02:1160 private:
[email protected]db16e6d2012-12-19 03:32:5761 // Non-owning pointer to the PluginDispatcher that owns this object.
62 PluginDispatcher* plugin_dispatcher_;
63
[email protected]11d0c362012-10-11 02:02:1164 DISALLOW_COPY_AND_ASSIGN(FlashResource);
65};
66
67} // namespace proxy
68} // namespace ppapi
69
70#endif // PPAPI_PROXY_FLASH_RESOURCE_H_