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

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

Issue 238923007: PPAPI: Format ppapi/thunk using clang-format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // From private/ppb_output_protection_private.idl, 5 // From private/ppb_output_protection_private.idl modified Fri Nov 1 16:12:12
6 // modified Thu Oct 31 12:30:06 2013. 6 // 2013.
7 7
8 #include "ppapi/c/pp_completion_callback.h" 8 #include "ppapi/c/pp_completion_callback.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/private/ppb_output_protection_private.h" 10 #include "ppapi/c/private/ppb_output_protection_private.h"
11 #include "ppapi/shared_impl/tracked_callback.h" 11 #include "ppapi/shared_impl/tracked_callback.h"
12 #include "ppapi/thunk/enter.h" 12 #include "ppapi/thunk/enter.h"
13 #include "ppapi/thunk/ppapi_thunk_export.h" 13 #include "ppapi/thunk/ppapi_thunk_export.h"
14 #include "ppapi/thunk/ppb_output_protection_api.h" 14 #include "ppapi/thunk/ppb_output_protection_api.h"
15 15
16 namespace ppapi { 16 namespace ppapi {
(...skipping 16 matching lines...) Expand all
33 } 33 }
34 34
35 int32_t QueryStatus(PP_Resource resource, 35 int32_t QueryStatus(PP_Resource resource,
36 uint32_t* link_mask, 36 uint32_t* link_mask,
37 uint32_t* protection_mask, 37 uint32_t* protection_mask,
38 struct PP_CompletionCallback callback) { 38 struct PP_CompletionCallback callback) {
39 VLOG(4) << "PPB_OutputProtection_Private::QueryStatus()"; 39 VLOG(4) << "PPB_OutputProtection_Private::QueryStatus()";
40 EnterResource<PPB_OutputProtection_API> enter(resource, callback, true); 40 EnterResource<PPB_OutputProtection_API> enter(resource, callback, true);
41 if (enter.failed()) 41 if (enter.failed())
42 return enter.retval(); 42 return enter.retval();
43 return enter.SetResult(enter.object()->QueryStatus(link_mask, 43 return enter.SetResult(enter.object()->QueryStatus(link_mask, protection_mask,
44 protection_mask,
45 enter.callback())); 44 enter.callback()));
46 } 45 }
47 46
48 int32_t EnableProtection(PP_Resource resource, 47 int32_t EnableProtection(PP_Resource resource,
49 uint32_t desired_protection_mask, 48 uint32_t desired_protection_mask,
50 struct PP_CompletionCallback callback) { 49 struct PP_CompletionCallback callback) {
51 VLOG(4) << "PPB_OutputProtection_Private::EnableProtection()"; 50 VLOG(4) << "PPB_OutputProtection_Private::EnableProtection()";
52 EnterResource<PPB_OutputProtection_API> enter(resource, callback, true); 51 EnterResource<PPB_OutputProtection_API> enter(resource, callback, true);
53 if (enter.failed()) 52 if (enter.failed())
54 return enter.retval(); 53 return enter.retval();
55 return enter.SetResult(enter.object()->EnableProtection( 54 return enter.SetResult(enter.object()->EnableProtection(
56 desired_protection_mask, 55 desired_protection_mask, enter.callback()));
57 enter.callback()));
58 } 56 }
59 57
60 const PPB_OutputProtection_Private_0_1 58 const PPB_OutputProtection_Private_0_1
61 g_ppb_outputprotection_private_thunk_0_1 = { 59 g_ppb_outputprotection_private_thunk_0_1 = {&Create,
62 &Create, 60 &IsOutputProtection,
63 &IsOutputProtection, 61 &QueryStatus,
64 &QueryStatus, 62 &EnableProtection};
65 &EnableProtection
66 };
67 63
68 } // namespace 64 } // namespace
69 65
70 PPAPI_THUNK_EXPORT const PPB_OutputProtection_Private_0_1* 66 PPAPI_THUNK_EXPORT const PPB_OutputProtection_Private_0_1*
71 GetPPB_OutputProtection_Private_0_1_Thunk() { 67 GetPPB_OutputProtection_Private_0_1_Thunk() {
72 return &g_ppb_outputprotection_private_thunk_0_1; 68 return &g_ppb_outputprotection_private_thunk_0_1;
73 } 69 }
74 70
75 } // namespace thunk 71 } // namespace thunk
76 } // namespace ppapi 72 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_network_proxy_thunk.cc ('k') | ppapi/thunk/ppb_platform_verification_private_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698