| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 virtual void OnShutdown() OVERRIDE; | 78 virtual void OnShutdown() OVERRIDE; |
| 79 | 79 |
| 80 // Post LogDebugInfo to the correct proxy (and thus, on the correct thread). | 80 // Post LogDebugInfo to the correct proxy (and thus, on the correct thread). |
| 81 // This should only be called by HostLogHandler. To log to the UI, use the | 81 // This should only be called by HostLogHandler. To log to the UI, use the |
| 82 // standard LOG(INFO) and it will be sent to this method. | 82 // standard LOG(INFO) and it will be sent to this method. |
| 83 void PostLogDebugInfo(const std::string& message); | 83 void PostLogDebugInfo(const std::string& message); |
| 84 | 84 |
| 85 void SetWindow(NPWindow* np_window); | 85 void SetWindow(NPWindow* np_window); |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 // These state values are duplicated in the JS code. Remember to update both | 88 // These state values are duplicated in host_session.js. Remember to update |
| 89 // copies when making changes. | 89 // both copies when making changes. |
| 90 enum State { | 90 enum State { |
| 91 kDisconnected, | 91 kDisconnected, |
| 92 kStarting, | 92 kStarting, |
| 93 kRequestedAccessCode, | 93 kRequestedAccessCode, |
| 94 kReceivedAccessCode, | 94 kReceivedAccessCode, |
| 95 kConnected, | 95 kConnected, |
| 96 kDisconnecting, | 96 kDisconnecting, |
| 97 kError | 97 kError, |
| 98 kInvalidDomainError |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 ////////////////////////////////////////////////////////// | 101 ////////////////////////////////////////////////////////// |
| 101 // Plugin methods for It2Me host. | 102 // Plugin methods for It2Me host. |
| 102 | 103 |
| 103 // Start connection. args are: | 104 // Start connection. args are: |
| 104 // string uid, string auth_token | 105 // string uid, string auth_token |
| 105 // No result. | 106 // No result. |
| 106 bool Connect(const NPVariant* args, uint32_t arg_count, NPVariant* result); | 107 bool Connect(const NPVariant* args, uint32_t arg_count, NPVariant* result); |
| 107 | 108 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies | 354 // SequencedWorkerPool. Problem is that SequencedWorkerPool relies |
| 354 // on MessageLoopProxy::current(). | 355 // on MessageLoopProxy::current(). |
| 355 base::Thread worker_thread_; | 356 base::Thread worker_thread_; |
| 356 | 357 |
| 357 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); | 358 DISALLOW_COPY_AND_ASSIGN(HostNPScriptObject); |
| 358 }; | 359 }; |
| 359 | 360 |
| 360 } // namespace remoting | 361 } // namespace remoting |
| 361 | 362 |
| 362 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ | 363 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ |
| OLD | NEW |