OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cpp/core.h" | 5 #include "ppapi/cpp/core.h" |
6 | 6 |
| 7 #include "ppapi/cpp/common.h" |
7 #include "ppapi/cpp/completion_callback.h" | 8 #include "ppapi/cpp/completion_callback.h" |
8 | 9 |
9 namespace pp { | 10 namespace pp { |
10 | 11 |
11 // This function is implemented in the .cc file to avoid including completion | 12 // This function is implemented in the .cc file to avoid including completion |
12 // callback all over the project. | 13 // callback all over the project. |
13 void Core::CallOnMainThread(int32_t delay_in_milliseconds, | 14 void Core::CallOnMainThread(int32_t delay_in_milliseconds, |
14 const CompletionCallback& callback, | 15 const CompletionCallback& callback, |
15 int32_t result) { | 16 int32_t result) { |
16 return interface_->CallOnMainThread(delay_in_milliseconds, | 17 return interface_->CallOnMainThread(delay_in_milliseconds, |
17 callback.pp_completion_callback(), | 18 callback.pp_completion_callback(), |
18 result); | 19 result); |
19 } | 20 } |
20 | 21 |
21 bool Core::IsMainThread() { | 22 bool Core::IsMainThread() { |
22 return interface_->IsMainThread(); | 23 return PPBoolToBool(interface_->IsMainThread()); |
23 } | 24 } |
24 | 25 |
25 } // namespace pp | 26 } // namespace pp |
OLD | NEW |