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

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

Issue 7547001: Propagate connected user to web app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 4 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) 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool Enumerate(std::vector<std::string>* values); 61 bool Enumerate(std::vector<std::string>* values);
62 62
63 // Call LogDebugInfo handler if there is one. 63 // Call LogDebugInfo handler if there is one.
64 void LogDebugInfo(const std::string& message); 64 void LogDebugInfo(const std::string& message);
65 65
66 // remoting::HostStatusObserver implementation. 66 // remoting::HostStatusObserver implementation.
67 virtual void OnSignallingConnected(remoting::SignalStrategy* signal_strategy, 67 virtual void OnSignallingConnected(remoting::SignalStrategy* signal_strategy,
68 const std::string& full_jid) OVERRIDE; 68 const std::string& full_jid) OVERRIDE;
69 virtual void OnSignallingDisconnected() OVERRIDE; 69 virtual void OnSignallingDisconnected() OVERRIDE;
70 virtual void OnAccessDenied() OVERRIDE; 70 virtual void OnAccessDenied() OVERRIDE;
71 virtual void OnAuthenticatedClientsChanged(int clients_connected) OVERRIDE; 71 virtual void OnClientAuthenticated(
72 remoting::protocol::ConnectionToClient* client) OVERRIDE;
73 virtual void OnClientDisconnected(
74 remoting::protocol::ConnectionToClient* client) OVERRIDE;
72 virtual void OnShutdown() OVERRIDE; 75 virtual void OnShutdown() OVERRIDE;
73 76
74 private: 77 private:
75 enum State { 78 enum State {
76 kDisconnected, 79 kDisconnected,
77 kRequestedAccessCode, 80 kRequestedAccessCode,
78 kReceivedAccessCode, 81 kReceivedAccessCode,
79 kConnected, 82 kConnected,
80 kAffirmingConnection, 83 kAffirmingConnection,
81 kError 84 kError
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Utility function for PostTaskToNPThread. 124 // Utility function for PostTaskToNPThread.
122 static void NPTaskSpringboard(void* task); 125 static void NPTaskSpringboard(void* task);
123 126
124 // Set an exception for the current call. 127 // Set an exception for the current call.
125 void SetException(const std::string& exception_string); 128 void SetException(const std::string& exception_string);
126 129
127 NPP plugin_; 130 NPP plugin_;
128 NPObject* parent_; 131 NPObject* parent_;
129 int state_; 132 int state_;
130 std::string access_code_; 133 std::string access_code_;
134 std::string client_username_;
131 base::TimeDelta access_code_lifetime_; 135 base::TimeDelta access_code_lifetime_;
132 NPObject* log_debug_info_func_; 136 NPObject* log_debug_info_func_;
133 NPObject* on_state_changed_func_; 137 NPObject* on_state_changed_func_;
134 base::PlatformThreadId np_thread_id_; 138 base::PlatformThreadId np_thread_id_;
135 139
136 scoped_ptr<HostPluginLogger> logger_; 140 scoped_ptr<HostPluginLogger> logger_;
137 141
138 scoped_ptr<RegisterSupportHostRequest> register_request_; 142 scoped_ptr<RegisterSupportHostRequest> register_request_;
139 scoped_refptr<MutableHostConfig> host_config_; 143 scoped_refptr<MutableHostConfig> host_config_;
140 ChromotingHostContext host_context_; 144 ChromotingHostContext host_context_;
141 scoped_ptr<DesktopEnvironment> desktop_environment_; 145 scoped_ptr<DesktopEnvironment> desktop_environment_;
142 146
143 scoped_refptr<ChromotingHost> host_; 147 scoped_refptr<ChromotingHost> host_;
144 int failed_login_attempts_; 148 int failed_login_attempts_;
145 149
146 base::WaitableEvent disconnected_event_; 150 base::WaitableEvent disconnected_event_;
147 base::CancellationFlag destructing_; 151 base::CancellationFlag destructing_;
148 }; 152 };
149 153
150 } // namespace remoting 154 } // namespace remoting
151 155
152 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject); 156 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostNPScriptObject);
153 157
154 #endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_ 158 #endif // REMOTING_HOST_HOST_SCRIPT_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698