| 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_DEVICE_ID_RESOURCE_H_ | 5 #ifndef PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_ | 6 #define PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_ |
| 7 | 7 |
| 8 #include "ppapi/proxy/plugin_resource.h" | 8 #include "ppapi/proxy/plugin_resource.h" |
| 9 #include "ppapi/proxy/ppapi_proxy_export.h" | 9 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual ~FlashDeviceIDResource(); | 22 virtual ~FlashDeviceIDResource(); |
| 23 | 23 |
| 24 // Resource override. | 24 // Resource override. |
| 25 virtual thunk::PPB_Flash_DeviceID_API* AsPPB_Flash_DeviceID_API() OVERRIDE; | 25 virtual thunk::PPB_Flash_DeviceID_API* AsPPB_Flash_DeviceID_API() OVERRIDE; |
| 26 | 26 |
| 27 // PPB_Flash_DeviceID_API implementation. | 27 // PPB_Flash_DeviceID_API implementation. |
| 28 virtual int32_t GetDeviceID(PP_Var* id, | 28 virtual int32_t GetDeviceID(PP_Var* id, |
| 29 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 29 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // PluginResource override; | |
| 33 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, | |
| 34 const IPC::Message& msg); | |
| 35 | |
| 36 // IPC message handler. | 32 // IPC message handler. |
| 37 void OnPluginMsgGetDeviceIDReply(const ResourceMessageReplyParams& params, | 33 void OnPluginMsgGetDeviceIDReply(const ResourceMessageReplyParams& params, |
| 38 const std::string& id); | 34 const std::string& id); |
| 39 | 35 |
| 40 // Non-null when a callback is pending. | 36 // Non-null when a callback is pending. |
| 41 PP_Var* dest_; | 37 PP_Var* dest_; |
| 42 | 38 |
| 43 scoped_refptr<TrackedCallback> callback_; | 39 scoped_refptr<TrackedCallback> callback_; |
| 44 | 40 |
| 45 DISALLOW_COPY_AND_ASSIGN(FlashDeviceIDResource); | 41 DISALLOW_COPY_AND_ASSIGN(FlashDeviceIDResource); |
| 46 }; | 42 }; |
| 47 | 43 |
| 48 } // namespace proxy | 44 } // namespace proxy |
| 49 } // namespace ppapi | 45 } // namespace ppapi |
| 50 | 46 |
| 51 #endif // PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_ | 47 #endif // PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_ |
| OLD | NEW |