OLD | NEW |
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" | 13 #include "ppapi/proxy/ppapi_proxy_export.h" |
14 #include "ppapi/thunk/ppb_flash_functions_api.h" | 14 #include "ppapi/thunk/ppb_flash_functions_api.h" |
15 | 15 |
16 namespace ppapi { | 16 namespace ppapi { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
| 19 class PluginDispatcher; |
| 20 |
19 class PPAPI_PROXY_EXPORT FlashResource | 21 class PPAPI_PROXY_EXPORT FlashResource |
20 : public PluginResource, | 22 : public PluginResource, |
21 public NON_EXPORTED_BASE(thunk::PPB_Flash_Functions_API) { | 23 public NON_EXPORTED_BASE(thunk::PPB_Flash_Functions_API) { |
22 public: | 24 public: |
23 FlashResource(Connection connection, PP_Instance instance); | 25 FlashResource(Connection connection, |
| 26 PP_Instance instance, |
| 27 PluginDispatcher* plugin_dispatcher); |
24 virtual ~FlashResource(); | 28 virtual ~FlashResource(); |
25 | 29 |
26 // Resource override. | 30 // Resource override. |
27 virtual thunk::PPB_Flash_Functions_API* AsPPB_Flash_Functions_API() OVERRIDE; | 31 virtual thunk::PPB_Flash_Functions_API* AsPPB_Flash_Functions_API() OVERRIDE; |
28 | 32 |
29 // PPB_Flash_Functions_API implementation. | 33 // PPB_Flash_Functions_API implementation. |
30 virtual PP_Var GetProxyForURL(PP_Instance instance, | 34 virtual PP_Var GetProxyForURL(PP_Instance instance, |
31 const std::string& url) OVERRIDE; | 35 const std::string& url) OVERRIDE; |
32 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; | 36 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; |
33 virtual PP_Bool SetCrashData(PP_Instance instance, | 37 virtual PP_Bool SetCrashData(PP_Instance instance, |
34 PP_FlashCrashKey key, | 38 PP_FlashCrashKey key, |
35 PP_Var value) OVERRIDE; | 39 PP_Var value) OVERRIDE; |
36 virtual double GetLocalTimeZoneOffset(PP_Instance instance, | 40 virtual double GetLocalTimeZoneOffset(PP_Instance instance, |
37 PP_Time t) OVERRIDE; | 41 PP_Time t) OVERRIDE; |
| 42 virtual PP_Var GetSetting(PP_Instance instance, |
| 43 PP_FlashSetting setting) OVERRIDE; |
38 | 44 |
39 private: | 45 private: |
| 46 // Non-owning pointer to the PluginDispatcher that owns this object. |
| 47 PluginDispatcher* plugin_dispatcher_; |
| 48 |
40 DISALLOW_COPY_AND_ASSIGN(FlashResource); | 49 DISALLOW_COPY_AND_ASSIGN(FlashResource); |
41 }; | 50 }; |
42 | 51 |
43 } // namespace proxy | 52 } // namespace proxy |
44 } // namespace ppapi | 53 } // namespace ppapi |
45 | 54 |
46 #endif // PPAPI_PROXY_FLASH_RESOURCE_H_ | 55 #endif // PPAPI_PROXY_FLASH_RESOURCE_H_ |
OLD | NEW |