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

Side by Side Diff: ppapi/thunk/ppb_flash_menu_thunk.cc

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated TestURLLoader to test blocking callbacks. Created 8 years, 8 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
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/c/private/ppb_flash_menu.h" 5 #include "ppapi/c/private/ppb_flash_menu.h"
6 #include "ppapi/c/pp_completion_callback.h" 6 #include "ppapi/c/pp_completion_callback.h"
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/thunk/enter.h" 8 #include "ppapi/thunk/enter.h"
9 #include "ppapi/thunk/thunk.h" 9 #include "ppapi/thunk/thunk.h"
10 #include "ppapi/thunk/ppb_flash_menu_api.h" 10 #include "ppapi/thunk/ppb_flash_menu_api.h"
(...skipping 16 matching lines...) Expand all
27 return PP_FromBool(enter.succeeded()); 27 return PP_FromBool(enter.succeeded());
28 } 28 }
29 29
30 int32_t Show(PP_Resource resource, 30 int32_t Show(PP_Resource resource,
31 const PP_Point* location, 31 const PP_Point* location,
32 int32_t* selected_id, 32 int32_t* selected_id,
33 PP_CompletionCallback callback) { 33 PP_CompletionCallback callback) {
34 EnterResource<PPB_Flash_Menu_API> enter(resource, callback, true); 34 EnterResource<PPB_Flash_Menu_API> enter(resource, callback, true);
35 if (enter.failed()) 35 if (enter.failed())
36 return enter.retval(); 36 return enter.retval();
37 return enter.SetResult(enter.object()->Show(location, selected_id, callback)); 37 return enter.SetResult(enter.object()->Show(location, selected_id,
38 enter.callback()));
38 } 39 }
39 40
40 const PPB_Flash_Menu g_ppb_flash_menu_thunk = { 41 const PPB_Flash_Menu g_ppb_flash_menu_thunk = {
41 &Create, 42 &Create,
42 &IsFlashMenu, 43 &IsFlashMenu,
43 &Show 44 &Show
44 }; 45 };
45 46
46 } // namespace 47 } // namespace
47 48
48 const PPB_Flash_Menu_0_2* GetPPB_Flash_Menu_0_2_Thunk() { 49 const PPB_Flash_Menu_0_2* GetPPB_Flash_Menu_0_2_Thunk() {
49 return &g_ppb_flash_menu_thunk; 50 return &g_ppb_flash_menu_thunk;
50 } 51 }
51 52
52 } // namespace thunk 53 } // namespace thunk
53 } // namespace ppapi 54 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698