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 /** | 6 /** |
7 * This file defines the <code>PPB_Console_Dev</code> interface. | 7 * This file defines the <code>PPB_Console</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 [generate_thunk] | 10 [generate_thunk] |
11 | 11 |
12 label Chrome { | 12 label Chrome { |
13 M14 = 0.1 | 13 M25 = 1.0 |
14 }; | 14 }; |
15 | 15 |
16 [assert_size(4)] | 16 [assert_size(4)] |
17 enum PP_LogLevel_Dev { | 17 enum PP_LogLevel { |
18 PP_LOGLEVEL_TIP = 0, | 18 PP_LOGLEVEL_TIP = 0, |
19 PP_LOGLEVEL_LOG = 1, | 19 PP_LOGLEVEL_LOG = 1, |
20 PP_LOGLEVEL_WARNING = 2, | 20 PP_LOGLEVEL_WARNING = 2, |
21 PP_LOGLEVEL_ERROR = 3 | 21 PP_LOGLEVEL_ERROR = 3 |
22 }; | 22 }; |
23 | 23 |
24 interface PPB_Console_Dev { | 24 interface PPB_Console { |
25 /** | 25 /** |
26 * Logs the given message to the JavaScript console associated with the | 26 * Logs the given message to the JavaScript console associated with the |
27 * given plugin instance with the given logging level. The name of the plugin | 27 * given plugin instance with the given logging level. The name of the plugin |
28 * issuing the log message will be automatically prepended to the message. | 28 * issuing the log message will be automatically prepended to the message. |
29 * The value may be any type of Var. | 29 * The value may be any type of Var. |
30 */ | 30 */ |
31 void Log( | 31 void Log( |
32 [in] PP_Instance instance, | 32 [in] PP_Instance instance, |
33 [in] PP_LogLevel_Dev level, | 33 [in] PP_LogLevel level, |
34 [in] PP_Var value); | 34 [in] PP_Var value); |
35 | 35 |
36 /** | 36 /** |
37 * Logs a message to the console with the given source information rather | 37 * Logs a message to the console with the given source information rather |
38 * than using the internal PPAPI plugin name. The name must be a string var. | 38 * than using the internal PPAPI plugin name. The name must be a string var. |
39 * | 39 * |
40 * The regular log function will automatically prepend the name of your | 40 * The regular log function will automatically prepend the name of your |
41 * plugin to the message as the "source" of the message. Some plugins may | 41 * plugin to the message as the "source" of the message. Some plugins may |
42 * wish to override this. For example, if your plugin is a Python | 42 * wish to override this. For example, if your plugin is a Python |
43 * interpreter, you would want log messages to contain the source .py file | 43 * interpreter, you would want log messages to contain the source .py file |
44 * doing the log statement rather than have "python" show up in the console. | 44 * doing the log statement rather than have "python" show up in the console. |
45 */ | 45 */ |
46 void LogWithSource( | 46 void LogWithSource( |
47 [in] PP_Instance instance, | 47 [in] PP_Instance instance, |
48 [in] PP_LogLevel_Dev level, | 48 [in] PP_LogLevel level, |
49 [in] PP_Var source, | 49 [in] PP_Var source, |
50 [in] PP_Var value); | 50 [in] PP_Var value); |
51 }; | 51 }; |
OLD | NEW |