blob: 36c4e8a2a2071348c6c30753f568a646bb23666a [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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
3// found in the LICENSE file.
4
5#include "ppapi/cpp/core.h"
6
7#include "ppapi/cpp/completion_callback.h"
8
9namespace pp {
10
11// This function is implemented in the .cc file to avoid including completion
12// callback all over the project.
13void Core::CallOnMainThread(int32_t delay_in_milliseconds,
14 const CompletionCallback& callback,
15 int32_t result) {
16 return interface_->CallOnMainThread(delay_in_milliseconds,
17 callback.pp_completion_callback(),
18 result);
19}
20
21bool Core::IsMainThread() {
22 return PP_ToBool(interface_->IsMainThread());
23}
24
25} // namespace pp