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

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

Issue 9113044: Convert to new enter method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PATCH DESCRIPTIONS ARE A STUPID WASTE OF TIME Created 8 years, 10 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
« no previous file with comments | « ppapi/thunk/ppb_file_system_thunk.cc ('k') | ppapi/thunk/ppb_flash_menu_thunk.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/c/pp_errors.h" 5 #include "ppapi/c/pp_errors.h"
6 #include "ppapi/c/private/ppb_flash_clipboard.h" 6 #include "ppapi/c/private/ppb_flash_clipboard.h"
7 #include "ppapi/thunk/enter.h" 7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/thunk.h" 8 #include "ppapi/thunk/thunk.h"
9 #include "ppapi/thunk/ppb_flash_clipboard_api.h" 9 #include "ppapi/thunk/ppb_flash_clipboard_api.h"
10 10
(...skipping 19 matching lines...) Expand all
30 if (enter.failed()) 30 if (enter.failed())
31 return PP_MakeUndefined(); 31 return PP_MakeUndefined();
32 return enter.functions()->ReadPlainText(instance, clipboard_type); 32 return enter.functions()->ReadPlainText(instance, clipboard_type);
33 } 33 }
34 34
35 int32_t WritePlainText(PP_Instance instance, 35 int32_t WritePlainText(PP_Instance instance,
36 PP_Flash_Clipboard_Type clipboard_type, 36 PP_Flash_Clipboard_Type clipboard_type,
37 PP_Var text) { 37 PP_Var text) {
38 EnterFlashClipboard enter(instance, true); 38 EnterFlashClipboard enter(instance, true);
39 if (enter.failed()) 39 if (enter.failed())
40 return PP_ERROR_NOINTERFACE; 40 return enter.retval();
41 return enter.functions()->WritePlainText(instance, clipboard_type, text); 41 return enter.functions()->WritePlainText(instance, clipboard_type, text);
42 } 42 }
43 43
44 const PPB_Flash_Clipboard g_ppb_flash_clipboard_thunk = { 44 const PPB_Flash_Clipboard g_ppb_flash_clipboard_thunk = {
45 &IsFormatAvailable, 45 &IsFormatAvailable,
46 &ReadPlainText, 46 &ReadPlainText,
47 &WritePlainText 47 &WritePlainText
48 }; 48 };
49 49
50 } // namespace 50 } // namespace
51 51
52 const PPB_Flash_Clipboard_3_0* GetPPB_Flash_Clipboard_3_0_Thunk() { 52 const PPB_Flash_Clipboard_3_0* GetPPB_Flash_Clipboard_3_0_Thunk() {
53 return &g_ppb_flash_clipboard_thunk; 53 return &g_ppb_flash_clipboard_thunk;
54 } 54 }
55 55
56 } // namespace thunk 56 } // namespace thunk
57 } // namespace ppapi 57 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_file_system_thunk.cc ('k') | ppapi/thunk/ppb_flash_menu_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698