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 | 5 |
6 #include "nacl_io/real_pepper_interface.h" | 6 #include "nacl_io/real_pepper_interface.h" |
7 #include <assert.h> | 7 #include <assert.h> |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 | 9 |
10 #include <ppapi/c/pp_errors.h> | 10 #include <ppapi/c/pp_errors.h> |
11 | 11 |
| 12 namespace nacl_io { |
12 | 13 |
13 #include "nacl_io/pepper/undef_macros.h" | 14 #include "nacl_io/pepper/undef_macros.h" |
14 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ | 15 #define BEGIN_INTERFACE(BaseClass, PPInterface, InterfaceString) \ |
15 class Real##BaseClass : public BaseClass { \ | 16 class Real##BaseClass : public BaseClass { \ |
16 public: \ | 17 public: \ |
17 explicit Real##BaseClass(const PPInterface* interface); | 18 explicit Real##BaseClass(const PPInterface* interface); |
18 #define END_INTERFACE(BaseClass, PPInterface) \ | 19 #define END_INTERFACE(BaseClass, PPInterface) \ |
19 private: \ | 20 private: \ |
20 const PPInterface* interface_; \ | 21 const PPInterface* interface_; \ |
21 }; | 22 }; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 if (!message_loop) { | 131 if (!message_loop) { |
131 message_loop = message_loop_interface_->Create(instance_); | 132 message_loop = message_loop_interface_->Create(instance_); |
132 result = message_loop_interface_->AttachToCurrentThread(message_loop); | 133 result = message_loop_interface_->AttachToCurrentThread(message_loop); |
133 assert(result == PP_OK); | 134 assert(result == PP_OK); |
134 } | 135 } |
135 } | 136 } |
136 | 137 |
137 return PP_OK; | 138 return PP_OK; |
138 } | 139 } |
139 | 140 |
| 141 } // namespace nacl_io |
| 142 |
OLD | NEW |