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

Side by Side Diff: remoting/host/plugin/host_log_handler.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, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_PLUGIN_HOST_LOG_HANDLER_H_
6 #define REMOTING_HOST_PLUGIN_HOST_LOG_HANDLER_H_
7
8 #include "base/string16.h"
Wez 2011/08/31 01:30:16 I don't think we need string16 here?
garykac 2011/08/31 23:59:46 Done.
9 #include "base/threading/platform_thread.h"
Wez 2011/08/31 01:30:16 I don't think we need platform threads here?
garykac 2011/08/31 23:59:46 Done.
10
11 namespace remoting {
12
13 class HostNPScriptObject;
14
15 class HostLogHandler {
16 public:
17 // Register/Unregister the log handler.
Wez 2011/08/31 01:30:16 nit: Lose /"Unregister".
garykac 2011/08/31 23:59:46 Done.
18 // These should be called from the plugin init/destroy methods so that they
19 // are only called once per plugin process (not once per plugin instance).
20 static void RegisterLogMessageHandler();
21
22 // We don't have the corresponding UnregisterLogMessageHandler because it
23 // is not safe to call it when there are multiple threads that might be
24 // logging.
25
26 static void RegisterLoggingScriptObject(HostNPScriptObject* script_object);
27 static void UnregisterLoggingScriptObject(HostNPScriptObject* script_object);
28
29 private:
30 // A Log Message Handler that is called after each LOG message has been
31 // processed. This must be of type LogMessageHandlerFunction defined in
32 // base/logging.h.
33 static bool LogToUI(int severity, const char* file, int line,
34 size_t message_start, const std::string& str);
35 };
36
37 } // namespace remoting
38
39 #endif // REMOTING_HOST_PLUGIN_HOST_LOG_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/plugin/host_log_handler.cc » ('j') | remoting/host/plugin/host_script_object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698