OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 5 #ifndef REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 6 #define REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 virtual void OnSignallingConnected(remoting::SignalStrategy* signal_strategy, | 63 virtual void OnSignallingConnected(remoting::SignalStrategy* signal_strategy, |
64 const std::string& full_jid) OVERRIDE; | 64 const std::string& full_jid) OVERRIDE; |
65 virtual void OnSignallingDisconnected() OVERRIDE; | 65 virtual void OnSignallingDisconnected() OVERRIDE; |
66 virtual void OnAccessDenied() OVERRIDE; | 66 virtual void OnAccessDenied() OVERRIDE; |
67 virtual void OnClientAuthenticated( | 67 virtual void OnClientAuthenticated( |
68 remoting::protocol::ConnectionToClient* client) OVERRIDE; | 68 remoting::protocol::ConnectionToClient* client) OVERRIDE; |
69 virtual void OnClientDisconnected( | 69 virtual void OnClientDisconnected( |
70 remoting::protocol::ConnectionToClient* client) OVERRIDE; | 70 remoting::protocol::ConnectionToClient* client) OVERRIDE; |
71 virtual void OnShutdown() OVERRIDE; | 71 virtual void OnShutdown() OVERRIDE; |
72 | 72 |
73 // Register/Unregister the log handler. | |
74 // These should be called from the plugin init/destroy methods so that they | |
75 // are only called once per plugin (not once per instance). | |
Wez
2011/08/16 00:05:45
nit: They need to be called once per plugin _proce
garykac
2011/08/16 00:19:40
Done.
| |
76 static void RegisterLogger(); | |
77 static void UnregisterLogger(); | |
78 | |
73 // A Log Message Handler that is called after each LOG message has been | 79 // A Log Message Handler that is called after each LOG message has been |
74 // processed. This must be of type LogMessageHandlerFunction defined in | 80 // processed. This must be of type LogMessageHandlerFunction defined in |
75 // base/logging.h. | 81 // base/logging.h. |
76 static bool LogToUI(int severity, const char* file, int line, | 82 static bool LogToUI(int severity, const char* file, int line, |
77 size_t message_start, const std::string& str); | 83 size_t message_start, const std::string& str); |
78 private: | 84 private: |
79 enum State { | 85 enum State { |
80 kDisconnected, | 86 kDisconnected, |
81 kRequestedAccessCode, | 87 kRequestedAccessCode, |
82 kReceivedAccessCode, | 88 kReceivedAccessCode, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 | 157 |
152 base::WaitableEvent disconnected_event_; | 158 base::WaitableEvent disconnected_event_; |
153 base::CancellationFlag destructing_; | 159 base::CancellationFlag destructing_; |
154 }; | 160 }; |
155 | 161 |
156 } // namespace remoting | 162 } // namespace remoting |
157 | 163 |
158 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject); | 164 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject); |
159 | 165 |
160 #endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_ | 166 #endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_ |
OLD | NEW |