Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: ppapi/cpp/instance.h

Issue 11416214: PPAPI: Move PPB_Console out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/ppb_console.h ('k') | ppapi/cpp/instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/instance.h
diff --git a/ppapi/cpp/instance.h b/ppapi/cpp/instance.h
index 5e7931cb16926eb05e3090ddc46b1d48e904f681..00eaadcfe959b3bdae8a6c2fe80a979ec819c022 100644
--- a/ppapi/cpp/instance.h
+++ b/ppapi/cpp/instance.h
@@ -14,6 +14,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/ppb_console.h"
#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/view.h"
@@ -472,6 +473,29 @@ class Instance {
/// @}
+ /// @{
+ /// @name PPB_Console methods for logging to the console:
+
+ /// Logs the given message to the JavaScript console associated with the
+ /// given plugin instance with the given logging level. The name of the plugin
+ /// issuing the log message will be automatically prepended to the message.
+ /// The value may be any type of Var.
+ void LogToConsole(PP_LogLevel level, const Var& value);
+
+ /// Logs a message to the console with the given source information rather
+ /// than using the internal PPAPI plugin name. The name must be a string var.
+ ///
+ /// The regular log function will automatically prepend the name of your
+ /// plugin to the message as the "source" of the message. Some plugins may
+ /// wish to override this. For example, if your plugin is a Python
+ /// interpreter, you would want log messages to contain the source .py file
+ /// doing the log statement rather than have "python" show up in the console.
+ void LogToConsoleWithSource(PP_LogLevel level,
+ const Var& source,
+ const Var& value);
+
+ /// @}
+
/// AddPerInstanceObject() associates an instance with an interface,
/// creating an object.
///
« no previous file with comments | « ppapi/c/ppb_console.h ('k') | ppapi/cpp/instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698