summaryrefslogtreecommitdiffstats
path: root/remoting/host/plugin
diff options
context:
space:
mode:
authorrobertphillips@google.com <robertphillips@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 12:45:36 +0000
committerrobertphillips@google.com <robertphillips@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-01 12:45:36 +0000
commit966224629669f9a2ef62a2e40d3d4b67c1235689 (patch)
tree92dc190252e562be3cccbb76bdec373169d825c7 /remoting/host/plugin
parent035213a6e5c49f37dcc7966b02efc2b6f14d2c84 (diff)
downloadchromium_src-966224629669f9a2ef62a2e40d3d4b67c1235689.zip
chromium_src-966224629669f9a2ef62a2e40d3d4b67c1235689.tar.gz
chromium_src-966224629669f9a2ef62a2e40d3d4b67c1235689.tar.bz2
Revert 232331 "It2Me native messaging: GYP and source refactoring"
> It2Me native messaging: GYP and source refactoring > > 1. Add "me2me" to the names of all the me2me specific GYP targets and source files. This makes it easier for my next CL that will add the It2Me native messaging host component. > 2. Create a remoting_native_messaging_base GYP target that contains the common native messaging plumbing code shared between remoting_core, remoting_me2me_native_messaging_host and the to-be-created remoting_it2me_native_messaging_host. > 3. Clean up some dependencies in remoting.gyp: e.g. the native messaging manifest should be depended on by the archive targets, not the native messaging host binary targets. > 4. Rename It2MeImpl to It2MeHost. > > BUG=309844 > > Review URL: https://codereview.chromium.org/49113003 TBR=weitaosu@chromium.org Review URL: https://codereview.chromium.org/50033003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232341 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/plugin')
-rw-r--r--remoting/host/plugin/host_script_object.cc26
-rw-r--r--remoting/host/plugin/host_script_object.h16
2 files changed, 21 insertions, 21 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index 542f725..66d228c 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -130,9 +130,9 @@ HostNPScriptObject::~HostNPScriptObject() {
HostLogHandler::UnregisterLoggingScriptObject(this);
// Stop the It2Me host if the caller forgot to.
- if (it2me_host_.get()) {
- it2me_host_->Disconnect();
- it2me_host_ = NULL;
+ if (it2me_impl_.get()) {
+ it2me_impl_->Disconnect();
+ it2me_impl_ = NULL;
}
}
@@ -315,9 +315,9 @@ bool HostNPScriptObject::SetProperty(const std::string& property_name,
if (property_name == kAttrNameOnNatTraversalPolicyChanged) {
if (NPVARIANT_IS_OBJECT(*value)) {
on_nat_traversal_policy_changed_func_ = NPVARIANT_TO_OBJECT(*value);
- if (it2me_host_.get()) {
- // Ask the It2Me host to notify the web-app of the policy.
- it2me_host_->RequestNatPolicy();
+ if (it2me_impl_.get()) {
+ // Ask the It2Me implementation to notify the web-app of the policy.
+ it2me_impl_->RequestNatPolicy();
}
return true;
} else {
@@ -454,7 +454,7 @@ bool HostNPScriptObject::Connect(const NPVariant* args,
return false;
}
- if (it2me_host_.get()) {
+ if (it2me_impl_.get()) {
SetException("connect: can be called only when disconnected");
return false;
}
@@ -483,11 +483,11 @@ bool HostNPScriptObject::Connect(const NPVariant* args,
return false;
}
- // Create the It2Me host and start connecting.
- it2me_host_ = new It2MeHost(
+ // Create the It2Me host implementation and start connecting.
+ it2me_impl_ = new It2MeImpl(
host_context.Pass(), plugin_task_runner_, weak_ptr_,
xmpp_config, directory_bot_jid_);
- it2me_host_->Connect();
+ it2me_impl_->Connect();
return true;
}
@@ -501,9 +501,9 @@ bool HostNPScriptObject::Disconnect(const NPVariant* args,
return false;
}
- if (it2me_host_.get()) {
- it2me_host_->Disconnect();
- it2me_host_ = NULL;
+ if (it2me_impl_.get()) {
+ it2me_impl_->Disconnect();
+ it2me_impl_ = NULL;
}
return true;
diff --git a/remoting/host/plugin/host_script_object.h b/remoting/host/plugin/host_script_object.h
index 2558903..74abcd9 100644
--- a/remoting/host/plugin/host_script_object.h
+++ b/remoting/host/plugin/host_script_object.h
@@ -13,7 +13,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "remoting/base/auto_thread_task_runner.h"
-#include "remoting/host/it2me/it2me_host.h"
+#include "remoting/host/it2me/it2me_impl.h"
#include "remoting/host/plugin/host_plugin_utils.h"
#include "remoting/host/setup/daemon_controller.h"
#include "remoting/jingle_glue/xmpp_signal_strategy.h"
@@ -25,7 +25,7 @@ namespace remoting {
// HostNPScriptObject creates threads that are required to run
// ChromotingHost and starts/stops the host on those threads. When
// destroyed it synchronously shuts down the host and all threads.
-class HostNPScriptObject : public It2MeHost::Observer {
+class HostNPScriptObject : public It2MeImpl::Observer {
public:
HostNPScriptObject(NPP plugin,
NPObject* parent,
@@ -157,7 +157,7 @@ class HostNPScriptObject : public It2MeHost::Observer {
bool StopDaemon(const NPVariant* args, uint32_t arg_count, NPVariant* result);
//////////////////////////////////////////////////////////
- // Implementation of It2MeHost::Observer methods.
+ // Implementation of It2MeImpl::Observer methods.
// Notifies OnStateChanged handler of a state change.
virtual void OnStateChanged(It2MeHostState state) OVERRIDE;
@@ -266,21 +266,21 @@ class HostNPScriptObject : public It2MeHost::Observer {
// It2Me host state.
// Internal implementation of the It2Me host function.
- scoped_refptr<It2MeHost> it2me_host_;
+ scoped_refptr<It2MeImpl> it2me_impl_;
- // Cached, read-only copies of |it2me_host_| session state.
+ // Cached, read-only copies of |it2me_impl_| session state.
It2MeHostState state_;
std::string access_code_;
base::TimeDelta access_code_lifetime_;
std::string client_username_;
- // IT2Me Talk server configuration used by |it2me_host_| to connect.
+ // IT2Me Talk server configuration used by |it2me_impl_| to connect.
XmppSignalStrategy::XmppServerConfig xmpp_server_config_;
- // Chromoting Bot JID used by |it2me_host_| to register the host.
+ // Chromoting Bot JID used by |it2me_impl_| to register the host.
std::string directory_bot_jid_;
- // Callbacks to notify in response to |it2me_host_| events.
+ // Callbacks to notify in response to |it2me_impl_| events.
ScopedRefNPObject on_nat_traversal_policy_changed_func_;
ScopedRefNPObject on_state_changed_func_;