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

Side by Side Diff: webkit/plugins/ppapi/common.cc

Issue 6899055: PPAPI: Force async callback invocation option. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #include "webkit/plugins/ppapi/common.h"
6
7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/ppb_core.h"
9 #include "webkit/plugins/ppapi/plugin_module.h"
10
11 namespace webkit {
12 namespace ppapi {
13
14 int32_t MayForceCallback(PP_CompletionCallback callback, int32_t result) {
15 if (result == PP_OK_COMPLETIONPENDING)
16 return result;
17
18 if (callback.func == NULL ||
19 (callback.flags & PP_COMPLETIONCALLBACK_FLAG_OPTIONAL) != 0)
20 return result;
21
22 PluginModule::GetCore()->CallOnMainThread(0, callback, result);
23 return PP_OK_COMPLETIONPENDING;
24 }
25
26 } // namespace ppapi
27 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698