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

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

Issue 7262015: Conenct Chromoting plugin debug log to JS UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing host logging files Created 9 years, 6 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_plugin_logger.h
diff --git a/remoting/host/plugin/host_plugin_logger.h b/remoting/host/plugin/host_plugin_logger.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a8b86e7f606f64e03e31648dd2eacdd8a189af7
--- /dev/null
+++ b/remoting/host/plugin/host_plugin_logger.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_PLUGIN_HOST_PLUGIN_LOGGER_H_
+#define REMOTING_HOST_PLUGIN_HOST_PLUGIN_LOGGER_H_
+
+#include "remoting/base/logger.h"
+
+#include "base/task.h"
+
+class MessageLoop;
+
+namespace remoting {
+
+class HostNPScriptObject;
+
+class HostPluginLogger : public Logger {
+ public:
+ HostPluginLogger(HostNPScriptObject* scriptable);
dmac 2011/06/26 14:34:44 explicit?
garykac 2011/06/27 21:24:20 Absolutely. Good catch. Fixed here and for the cl
+ virtual ~HostPluginLogger();
+
+ virtual void va_Log(logging::LogSeverity severity, const char* format,
+ va_list ap);
+ virtual void va_VLog(int verboselevel, const char* format, va_list ap);
+
+ private:
+ void LogToHostUI(const std::string& message);
+
+ HostNPScriptObject* scriptable_object_;
+ MessageLoop* message_loop_;
+
+ DISALLOW_COPY_AND_ASSIGN(HostPluginLogger);
+};
+
+} // namespace remoting
+
+DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostPluginLogger);
+
+#endif // REMOTING_HOST_PLUGIN_HOST_PLUGIN_LOGGER_H_

Powered by Google App Engine
This is Rietveld 408576698