Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: ppapi/proxy/flash_device_id_resource.h

Issue 10909138: Convert the async device ID getter to a chrome resource host (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/ppapi_proxy.gypi ('k') | ppapi/proxy/flash_device_id_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_
6 #define PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_
7
8 #include "ppapi/proxy/plugin_resource.h"
9 #include "ppapi/proxy/ppapi_proxy_export.h"
10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/ppb_flash_device_id_api.h"
12
13 namespace ppapi {
14 namespace proxy {
15
16 class FlashDeviceIDResource
17 : public PluginResource,
18 public thunk::PPB_Flash_DeviceID_API {
19 public:
20 FlashDeviceIDResource(Connection connection,
21 PP_Instance instance);
22 virtual ~FlashDeviceIDResource();
23
24 // Resource override.
25 virtual thunk::PPB_Flash_DeviceID_API* AsPPB_Flash_DeviceID_API() OVERRIDE;
26
27 // PPB_Flash_DeviceID_API implementation.
28 virtual int32_t GetDeviceID(PP_Var* id,
29 scoped_refptr<TrackedCallback> callback) OVERRIDE;
30
31 private:
32 // PluginResource override;
33 virtual void OnReplyReceived(const ResourceMessageReplyParams& params,
34 const IPC::Message& msg);
35
36 // IPC message handler.
37 void OnPluginMsgGetDeviceIDReply(const ResourceMessageReplyParams& params,
38 const std::string& id);
39
40 // Non-null when a callback is pending.
41 PP_Var* dest_;
42
43 scoped_refptr<TrackedCallback> callback_;
44
45 DISALLOW_COPY_AND_ASSIGN(FlashDeviceIDResource);
46 };
47
48 } // namespace proxy
49 } // namespace ppapi
50
51 #endif // PPAPI_PROXY_FLASH_DEVICE_ID_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/ppapi_proxy.gypi ('k') | ppapi/proxy/flash_device_id_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698