OLD | NEW |
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 // From ppb_messaging.idl modified Tue Mar 24 16:53:47 2015. | 5 // From ppb_messaging.idl modified Fri Mar 27 15:11:19 2015. |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/ppb_messaging.h" | 8 #include "ppapi/c/ppb_messaging.h" |
9 #include "ppapi/shared_impl/tracked_callback.h" | 9 #include "ppapi/shared_impl/tracked_callback.h" |
10 #include "ppapi/thunk/enter.h" | 10 #include "ppapi/thunk/enter.h" |
11 #include "ppapi/thunk/ppapi_thunk_export.h" | 11 #include "ppapi/thunk/ppapi_thunk_export.h" |
12 | 12 |
13 namespace ppapi { | 13 namespace ppapi { |
14 namespace thunk { | 14 namespace thunk { |
15 | 15 |
(...skipping 22 matching lines...) Expand all Loading... |
38 void UnregisterMessageHandler(PP_Instance instance) { | 38 void UnregisterMessageHandler(PP_Instance instance) { |
39 VLOG(4) << "PPB_Messaging::UnregisterMessageHandler()"; | 39 VLOG(4) << "PPB_Messaging::UnregisterMessageHandler()"; |
40 EnterInstance enter(instance); | 40 EnterInstance enter(instance); |
41 if (enter.failed()) | 41 if (enter.failed()) |
42 return; | 42 return; |
43 enter.functions()->UnregisterMessageHandler(instance); | 43 enter.functions()->UnregisterMessageHandler(instance); |
44 } | 44 } |
45 | 45 |
46 const PPB_Messaging_1_0 g_ppb_messaging_thunk_1_0 = {&PostMessage}; | 46 const PPB_Messaging_1_0 g_ppb_messaging_thunk_1_0 = {&PostMessage}; |
47 | 47 |
48 const PPB_Messaging_1_2 g_ppb_messaging_thunk_1_2 = {&PostMessage, | 48 const PPB_Messaging_1_2 g_ppb_messaging_thunk_1_2 = { |
49 &RegisterMessageHandler, | 49 &PostMessage, &RegisterMessageHandler, &UnregisterMessageHandler}; |
50 &UnregisterMessageHandler}; | |
51 | 50 |
52 } // namespace | 51 } // namespace |
53 | 52 |
54 PPAPI_THUNK_EXPORT const PPB_Messaging_1_0* GetPPB_Messaging_1_0_Thunk() { | 53 PPAPI_THUNK_EXPORT const PPB_Messaging_1_0* GetPPB_Messaging_1_0_Thunk() { |
55 return &g_ppb_messaging_thunk_1_0; | 54 return &g_ppb_messaging_thunk_1_0; |
56 } | 55 } |
57 | 56 |
58 PPAPI_THUNK_EXPORT const PPB_Messaging_1_2* GetPPB_Messaging_1_2_Thunk() { | 57 PPAPI_THUNK_EXPORT const PPB_Messaging_1_2* GetPPB_Messaging_1_2_Thunk() { |
59 return &g_ppb_messaging_thunk_1_2; | 58 return &g_ppb_messaging_thunk_1_2; |
60 } | 59 } |
61 | 60 |
62 } // namespace thunk | 61 } // namespace thunk |
63 } // namespace ppapi | 62 } // namespace ppapi |
OLD | NEW |