| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual void OnAccessDenied(const std::string& jid) OVERRIDE; | 74 virtual void OnAccessDenied(const std::string& jid) OVERRIDE; |
| 75 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; | 75 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE; |
| 76 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; | 76 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE; |
| 77 virtual void OnShutdown() OVERRIDE; | 77 virtual void OnShutdown() OVERRIDE; |
| 78 | 78 |
| 79 // Post LogDebugInfo to the correct proxy (and thus, on the correct thread). | 79 // Post LogDebugInfo to the correct proxy (and thus, on the correct thread). |
| 80 // This should only be called by HostLogHandler. To log to the UI, use the | 80 // This should only be called by HostLogHandler. To log to the UI, use the |
| 81 // standard LOG(INFO) and it will be sent to this method. | 81 // standard LOG(INFO) and it will be sent to this method. |
| 82 void PostLogDebugInfo(const std::string& message); | 82 void PostLogDebugInfo(const std::string& message); |
| 83 | 83 |
| 84 void SetWindow(NPWindow* np_window); |
| 85 |
| 84 private: | 86 private: |
| 85 // These state values are duplicated in the JS code. Remember to update both | 87 // These state values are duplicated in the JS code. Remember to update both |
| 86 // copies when making changes. | 88 // copies when making changes. |
| 87 enum State { | 89 enum State { |
| 88 kDisconnected, | 90 kDisconnected, |
| 89 kStarting, | 91 kStarting, |
| 90 kRequestedAccessCode, | 92 kRequestedAccessCode, |
| 91 kReceivedAccessCode, | 93 kReceivedAccessCode, |
| 92 kConnected, | 94 kConnected, |
| 93 kDisconnecting, | 95 kDisconnecting, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies | 310 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies |
| 309 // on MessageLoopProxy::current(). | 311 // on MessageLoopProxy::current(). |
| 310 base::Thread worker_thread_; | 312 base::Thread worker_thread_; |
| 311 | 313 |
| 312 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 314 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
| 313 }; | 315 }; |
| 314 | 316 |
| 315 } // namespace remoting | 317 } // namespace remoting |
| 316 | 318 |
| 317 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 319 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
| OLD | NEW |