blob: 36c4e8a2a2071348c6c30753f568a646bb23666a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/cpp/core.h"
#include "ppapi/cpp/completion_callback.h"
namespace pp {
// This function is implemented in the .cc file to avoid including completion
// callback all over the project.
void Core::CallOnMainThread(int32_t delay_in_milliseconds,
const CompletionCallback& callback,
int32_t result) {
return interface_->CallOnMainThread(delay_in_milliseconds,
callback.pp_completion_callback(),
result);
}
bool Core::IsMainThread() {
return PP_ToBool(interface_->IsMainThread());
}
} // namespace pp
|