diff options
Diffstat (limited to 'remoting/host/host_plugin.cc')
-rw-r--r-- | remoting/host/host_plugin.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/remoting/host/host_plugin.cc b/remoting/host/host_plugin.cc index 98f8a21..11b621e 100644 --- a/remoting/host/host_plugin.cc +++ b/remoting/host/host_plugin.cc @@ -131,7 +131,7 @@ NPObject* ObjectFromNPVariant(const NPVariant& variant) { } // NPAPI plugin implementation for remoting host script object. -class HostNPScriptObject : remoting::HostStatusObserver { +class HostNPScriptObject { public: HostNPScriptObject(NPP plugin, NPObject* parent) : plugin_(plugin), @@ -354,15 +354,9 @@ class HostNPScriptObject : remoting::HostStatusObserver { void OnReceivedSupportID(remoting::SupportAccessVerifier* access_verifier, bool success, const std::string& support_id); + void OnConnected(); void OnHostShutdown(); - // HostStatusObserver interface. - virtual void OnSignallingConnected(remoting::SignalStrategy* signal_strategy, - const std::string& full_jid) {} - virtual void OnSignallingDisconnected() {} - virtual void OnAuthenticatedClientsChanged(int clients_connected); - virtual void OnShutdown() {} - // Call a JavaScript function wrapped as an NPObject. // If result is non-null, the result of the call will be stored in it. // Caller is responsible for releasing result if they ask for it. @@ -463,7 +457,6 @@ bool HostNPScriptObject::Connect(const NPVariant* args, remoting::ChromotingHost::Create(&host_context_, host_config, access_verifier.release()); host->AddStatusObserver(register_request); - host->AddStatusObserver(this); host->set_me2mom(true); // Nothing went wrong, so lets save the host, config and request. @@ -523,14 +516,14 @@ void HostNPScriptObject::OnReceivedSupportID( OnStateChanged(kReceivedAccessCode); } -void HostNPScriptObject::OnHostShutdown() { +void HostNPScriptObject::OnConnected() { CHECK_NE(base::PlatformThread::CurrentId(), np_thread_id_); - OnStateChanged(kDisconnected); + OnStateChanged(kConnected); } -void HostNPScriptObject::OnAuthenticatedClientsChanged(int clients_connected) { +void HostNPScriptObject::OnHostShutdown() { CHECK_NE(base::PlatformThread::CurrentId(), np_thread_id_); - OnStateChanged(clients_connected ? kConnected : kDisconnected); + OnStateChanged(kDisconnected); } void HostNPScriptObject::OnStateChanged(State state) { |