summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_instance_proxy.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-31 05:00:26 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-31 05:00:26 +0000
commita9b16dd01eea5070cab620a1177a05a6b43677ee (patch)
tree69efee3fc88d36da9d9462e96bc7609b1f74b1b2 /ppapi/proxy/ppb_instance_proxy.h
parente0001c50836c2de0f95549fb901f4f23b4ab0a0b (diff)
downloadchromium_src-a9b16dd01eea5070cab620a1177a05a6b43677ee.zip
chromium_src-a9b16dd01eea5070cab620a1177a05a6b43677ee.tar.gz
chromium_src-a9b16dd01eea5070cab620a1177a05a6b43677ee.tar.bz2
The tricky part about logging to the console is that many of the errors are generated by invalid resources, from which we have no context. This means we don't know the instance to send the error message of.
Plumbing this through in a way that works proved much harder than I expected. I added log functions to the PpapiGlobals so that we can call it easily from all places. It can either go off an instance (like PPB_Console does) or a module, or nothing. In the module case, all consoles associated with all instances in the module get the log message, in the no context case, all consoles associated with any pepper plugin get the message. In the IPC proxy, we know the module from whence the error came since there's a unique process for it. So proxied errors with no context when run out of process get translated into errors with PP_Module context. In the common case, there's only one instance for a module, so this works out nicely. I added some logging ability to resources and added some errors to Graphics2D and URLLoader. We can add messages to more classes as the need arises. I added some advice on writing them to the chromium pepper page. Review URL: https://chromiumcodereview.appspot.com/9160017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_instance_proxy.h')
-rw-r--r--ppapi/proxy/ppb_instance_proxy.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h
index 0ce2562..71107e4 100644
--- a/ppapi/proxy/ppb_instance_proxy.h
+++ b/ppapi/proxy/ppb_instance_proxy.h
@@ -29,8 +29,7 @@ class SerializedVarOutParam;
class SerializedVarReturnValue;
class PPB_Instance_Proxy : public InterfaceProxy,
- public PPB_Instance_Shared,
- public thunk::PPB_Instance_FunctionAPI {
+ public PPB_Instance_Shared {
public:
PPB_Instance_Proxy(Dispatcher* dispatcher);
virtual ~PPB_Instance_Proxy();
@@ -54,13 +53,6 @@ class PPB_Instance_Proxy : public InterfaceProxy,
PP_Var script,
PP_Var* exception) OVERRIDE;
virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE;
- virtual void Log(PP_Instance instance,
- int log_level,
- PP_Var value) OVERRIDE;
- virtual void LogWithSource(PP_Instance instance,
- int log_level,
- PP_Var source,
- PP_Var value) OVERRIDE;
virtual void NumberOfFindResultsChanged(PP_Instance instance,
int32_t total,
PP_Bool final_result) OVERRIDE;
@@ -122,13 +114,6 @@ class PPB_Instance_Proxy : public InterfaceProxy,
SerializedVarReturnValue result);
void OnHostMsgGetDefaultCharSet(PP_Instance instance,
SerializedVarReturnValue result);
- void OnHostMsgLog(PP_Instance instance,
- int log_level,
- SerializedVarReceiveInput value);
- void OnHostMsgLogWithSource(PP_Instance instance,
- int log_level,
- SerializedVarReceiveInput source,
- SerializedVarReceiveInput value);
void OnHostMsgSetFullscreen(PP_Instance instance,
PP_Bool fullscreen,
PP_Bool* result);