Stop using VLOG() in WebSocketChannel.
[chromium-blink-merge.git] / ppapi / api / pp_bool.idl
blob1f8137b963507ade0016b7dd8b875d4363d71bd7
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
3 * found in the LICENSE file.
4 */
6 /**
7 * This file defines the <code>PP_Bool</code> enumeration for use in PPAPI C
8 * headers.
9 */
11 /**
12 * The <code>PP_Bool</code> enum is a boolean value for use in PPAPI C headers.
13 * The standard bool type is not available to pre-C99 compilers, and is not
14 * guaranteed to be compatible between C and C++, whereas the PPAPI C headers
15 * can be included from C or C++ code.
17 [assert_size(4)] enum PP_Bool {
18 PP_FALSE = 0,
19 PP_TRUE = 1
22 #inline cc
23 /**
24 * Converts a C++ "bool" type to a PP_Bool.
26 * @param[in] b A C++ "bool" type.
28 * @return A PP_Bool.
30 inline PP_Bool PP_FromBool(bool b) {
31 return b ? PP_TRUE : PP_FALSE;
34 /**
35 * Converts a PP_Bool to a C++ "bool" type.
37 * @param[in] b A PP_Bool.
39 * @return A C++ "bool" type.
41 inline bool PP_ToBool(PP_Bool b) {
42 return (b != PP_FALSE);
44 #endinl