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 #include "ppapi/proxy/flash_device_id_resource.h" | 5 #include "ppapi/proxy/flash_device_id_resource.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/proxy/dispatch_reply_message.h" | 9 #include "ppapi/proxy/dispatch_reply_message.h" |
10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 void FlashDeviceIDResource::OnPluginMsgGetDeviceIDReply( | 49 void FlashDeviceIDResource::OnPluginMsgGetDeviceIDReply( |
50 const ResourceMessageReplyParams& params, | 50 const ResourceMessageReplyParams& params, |
51 const std::string& id) { | 51 const std::string& id) { |
52 if (params.result() == PP_OK) | 52 if (params.result() == PP_OK) |
53 *dest_ = StringVar::StringToPPVar(id); | 53 *dest_ = StringVar::StringToPPVar(id); |
54 else | 54 else |
55 *dest_ = PP_MakeUndefined(); | 55 *dest_ = PP_MakeUndefined(); |
56 dest_ = NULL; | 56 dest_ = NULL; |
57 TrackedCallback::ClearAndRun(&callback_, params.result()); | 57 callback_->Run(params.result()); |
58 } | 58 } |
59 | 59 |
60 } // namespace proxy | 60 } // namespace proxy |
61 } // namespace ppapi | 61 } // namespace ppapi |
OLD | NEW |