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

Side by Side Diff: remoting/host/plugin/host_script_object.h

Issue 9316078: Added daemon process NPAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused headers. Fixed Windows and Mac builds. Created 8 years, 10 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
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 13 matching lines...) Expand all
24 #include "remoting/host/log_to_server.h" 24 #include "remoting/host/log_to_server.h"
25 #include "remoting/host/plugin/host_plugin_utils.h" 25 #include "remoting/host/plugin/host_plugin_utils.h"
26 #include "remoting/host/ui_strings.h" 26 #include "remoting/host/ui_strings.h"
27 #include "third_party/npapi/bindings/npapi.h" 27 #include "third_party/npapi/bindings/npapi.h"
28 #include "third_party/npapi/bindings/npfunctions.h" 28 #include "third_party/npapi/bindings/npfunctions.h"
29 #include "third_party/npapi/bindings/npruntime.h" 29 #include "third_party/npapi/bindings/npruntime.h"
30 30
31 namespace remoting { 31 namespace remoting {
32 32
33 class ChromotingHost; 33 class ChromotingHost;
34 class DaemonNpapi;
34 class DesktopEnvironment; 35 class DesktopEnvironment;
35 class It2MeHostUserInterface; 36 class It2MeHostUserInterface;
36 class MutableHostConfig; 37 class MutableHostConfig;
37 class RegisterSupportHostRequest; 38 class RegisterSupportHostRequest;
38 class SignalStrategy; 39 class SignalStrategy;
39 class SupportAccessVerifier; 40 class SupportAccessVerifier;
40 41
41 namespace policy_hack { 42 namespace policy_hack {
42 class NatPolicy; 43 class NatPolicy;
43 } // namespace policy_hack 44 } // namespace policy_hack
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 100
100 // Disconnect. No arguments or result. 101 // Disconnect. No arguments or result.
101 bool Disconnect(const NPVariant* args, uint32_t argCount, NPVariant* result); 102 bool Disconnect(const NPVariant* args, uint32_t argCount, NPVariant* result);
102 103
103 // Localize strings. args are: 104 // Localize strings. args are:
104 // localize_func - a callback function which returns a localized string for 105 // localize_func - a callback function which returns a localized string for
105 // a given tag name. 106 // a given tag name.
106 // No result. 107 // No result.
107 bool Localize(const NPVariant* args, uint32_t argCount, NPVariant* result); 108 bool Localize(const NPVariant* args, uint32_t argCount, NPVariant* result);
108 109
110 // Start the daemon process or change the PIN if it is running. Args are:
111 // string pin
Sergey Ulanov 2012/02/02 23:41:24 We'll probably need a bunch of other parameters be
Jamie 2012/02/03 00:47:41 I think I'd rather add these as needed in a more s
112 // No result.
113 bool StartDaemon(const NPVariant* args, uint32_t argCount, NPVariant* result);
114
115 // Start the daemon process or change the PIN if it is running. No arguments
116 // or result.
117 bool StopDaemon(const NPVariant* args, uint32_t argCount, NPVariant* result);
118
109 // Updates state of the host. Can be called only on the main thread. 119 // Updates state of the host. Can be called only on the main thread.
110 void SetState(State state); 120 void SetState(State state);
111 121
112 // Notifies OnStateChanged handler of a state change. 122 // Notifies OnStateChanged handler of a state change.
113 void NotifyStateChanged(State state); 123 void NotifyStateChanged(State state);
114 124
115 // Call LogDebugInfo handler if there is one. 125 // Call LogDebugInfo handler if there is one.
116 // This must be called on the correct thread. 126 // This must be called on the correct thread.
117 void LogDebugInfo(const std::string& message); 127 void LogDebugInfo(const std::string& message);
118 128
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 scoped_ptr<LogToServer> log_to_server_; 195 scoped_ptr<LogToServer> log_to_server_;
186 scoped_ptr<DesktopEnvironment> desktop_environment_; 196 scoped_ptr<DesktopEnvironment> desktop_environment_;
187 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_; 197 scoped_ptr<It2MeHostUserInterface> it2me_host_user_interface_;
188 198
189 scoped_refptr<ChromotingHost> host_; 199 scoped_refptr<ChromotingHost> host_;
190 int failed_login_attempts_; 200 int failed_login_attempts_;
191 201
192 UiStrings ui_strings_; 202 UiStrings ui_strings_;
193 base::Lock ui_strings_lock_; 203 base::Lock ui_strings_lock_;
194 204
205 scoped_ptr<DaemonNpapi> daemon_npapi_;
206
195 base::WaitableEvent disconnected_event_; 207 base::WaitableEvent disconnected_event_;
196 208
197 // True if we're in the middle of handling a log message. 209 // True if we're in the middle of handling a log message.
198 bool am_currently_logging_; 210 bool am_currently_logging_;
199 211
200 base::Lock nat_policy_lock_; 212 base::Lock nat_policy_lock_;
201 213
202 scoped_ptr<policy_hack::NatPolicy> nat_policy_; 214 scoped_ptr<policy_hack::NatPolicy> nat_policy_;
203 215
204 // Host the current nat traversal policy setting. 216 // Host the current nat traversal policy setting.
205 bool nat_traversal_enabled_; 217 bool nat_traversal_enabled_;
206 218
207 // Indicates whether or not a policy has ever been read. This is to ensure 219 // Indicates whether or not a policy has ever been read. This is to ensure
208 // that on startup, we do not accidentally start a connection before we have 220 // that on startup, we do not accidentally start a connection before we have
209 // queried our policy restrictions. 221 // queried our policy restrictions.
210 bool policy_received_; 222 bool policy_received_;
211 223
212 // On startup, it is possible to have Connect() called before the policy read 224 // On startup, it is possible to have Connect() called before the policy read
213 // is completed. Rather than just failing, we thunk the connection call so 225 // is completed. Rather than just failing, we thunk the connection call so
214 // it can be executed after at least one successful policy read. This 226 // it can be executed after at least one successful policy read. This
215 // variable contains the thunk if it is necessary. 227 // variable contains the thunk if it is necessary.
216 base::Closure pending_connect_; 228 base::Closure pending_connect_;
217 }; 229 };
218 230
219 } // namespace remoting 231 } // namespace remoting
220 232
221 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_ 233 #endif // REMOTING_HOST_PLUGIN_HOST_SCRIPT_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698