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

Unified Diff: remoting/host/plugin/host_script_object.h

Issue 7648042: Change Chromoting logger to be setup in plugin's NP_Initialize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move client log changes into separate cl Created 9 years, 4 months 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
Index: remoting/host/plugin/host_script_object.h
diff --git a/remoting/host/plugin/host_script_object.h b/remoting/host/plugin/host_script_object.h
index b67097ab74dbac52706617d92177a2081538bf4b..4efaec0da433e1b1a0744ee5d05ac2f891b4ecb0 100644
--- a/remoting/host/plugin/host_script_object.h
+++ b/remoting/host/plugin/host_script_object.h
@@ -80,11 +80,10 @@ class HostNPScriptObject : public HostStatusObserver {
remoting::protocol::ConnectionToClient* client) OVERRIDE;
virtual void OnShutdown() OVERRIDE;
- // A Log Message Handler that is called after each LOG message has been
- // processed. This must be of type LogMessageHandlerFunction defined in
- // base/logging.h.
- static bool LogToUI(int severity, const char* file, int line,
- size_t message_start, const std::string& str);
+ // Post LogDebugInfo to the correct proxy (and thus, on the correct thread).
+ // This should only be called by HostLogHandler. To log to the UI, use the
+ // standard LOG(INFO) and it will be sent to this method.
+ void PostLogDebugInfo(const std::string& message);
private:
enum State {
@@ -114,6 +113,7 @@ class HostNPScriptObject : public HostStatusObserver {
void OnStateChanged(State state);
// Call LogDebugInfo handler if there is one.
+ // This must be called on the correct thread.
void LogDebugInfo(const std::string& message);
// Callbacks invoked during session setup.
@@ -201,4 +201,4 @@ class HostNPScriptObject : public HostStatusObserver {
DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject);
-#endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_
+#endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_

Powered by Google App Engine
This is Rietveld 408576698