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

Side by Side Diff: ppapi/proxy/printing_resource.cc

Issue 10909244: PPAPI: Get TrackedCallback ready for running on non-main threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_url_loader_proxy.cc ('k') | ppapi/proxy/websocket_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
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/printing_resource.h" 5 #include "ppapi/proxy/printing_resource.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ipc/ipc_message.h" 8 #include "ipc/ipc_message.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/proxy/dispatch_reply_message.h" 10 #include "ppapi/proxy/dispatch_reply_message.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void PrintingResource::OnPluginMsgGetDefaultPrintSettingsReply( 44 void PrintingResource::OnPluginMsgGetDefaultPrintSettingsReply(
45 PP_PrintSettings_Dev* settings_out, 45 PP_PrintSettings_Dev* settings_out,
46 scoped_refptr<TrackedCallback> callback, 46 scoped_refptr<TrackedCallback> callback,
47 const ResourceMessageReplyParams& params, 47 const ResourceMessageReplyParams& params,
48 const PP_PrintSettings_Dev& settings) { 48 const PP_PrintSettings_Dev& settings) {
49 if (params.result() == PP_OK) 49 if (params.result() == PP_OK)
50 *settings_out = settings; 50 *settings_out = settings;
51 51
52 // Notify the plugin of the new data. 52 // Notify the plugin of the new data.
53 TrackedCallback::ClearAndRun(&callback, params.result()); 53 callback->Run(params.result());
54 // DANGER: May delete |this|! 54 // DANGER: May delete |this|!
55 } 55 }
56 56
57 } // namespace proxy 57 } // namespace proxy
58 } // namespace ppapi 58 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_url_loader_proxy.cc ('k') | ppapi/proxy/websocket_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698