Index: remoting/host/plugin/host_script_object.cc |
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc |
index d86389958fb277e3aee60767c7836acf466c0e7d..ac21615c7ecde0c0b255600f8a89e89e7995d4fb 100644 |
--- a/remoting/host/plugin/host_script_object.cc |
+++ b/remoting/host/plugin/host_script_object.cc |
@@ -86,15 +86,15 @@ class HostNPScriptObject::It2MeImpl |
It2MeImpl( |
scoped_ptr<ChromotingHostContext> context, |
scoped_refptr<base::SingleThreadTaskRunner> plugin_task_runner, |
- base::WeakPtr<HostNPScriptObject> script_object, |
- const UiStrings& ui_strings); |
+ base::WeakPtr<HostNPScriptObject> script_object); |
// Methods called by the script object, from the plugin thread. |
// Creates It2Me host structures and starts the host. |
void Connect(const std::string& uid, |
const std::string& auth_token, |
- const std::string& auth_service); |
+ const std::string& auth_service, |
+ const UiStrings& ui_strings); |
// Disconnects the host, ready for tear-down. |
// Also called internally, from the network thread. |
@@ -148,7 +148,6 @@ class HostNPScriptObject::It2MeImpl |
scoped_ptr<ChromotingHostContext> host_context_; |
scoped_refptr<base::SingleThreadTaskRunner> plugin_task_runner_; |
base::WeakPtr<HostNPScriptObject> script_object_; |
- UiStrings ui_strings_; |
State state_; |
@@ -188,12 +187,10 @@ class HostNPScriptObject::It2MeImpl |
HostNPScriptObject::It2MeImpl::It2MeImpl( |
scoped_ptr<ChromotingHostContext> host_context, |
scoped_refptr<base::SingleThreadTaskRunner> plugin_task_runner, |
- base::WeakPtr<HostNPScriptObject> script_object, |
- const UiStrings& ui_strings) |
+ base::WeakPtr<HostNPScriptObject> script_object) |
: host_context_(host_context.Pass()), |
plugin_task_runner_(plugin_task_runner), |
script_object_(script_object), |
- ui_strings_(ui_strings), |
state_(kDisconnected), |
failed_login_attempts_(0), |
nat_traversal_enabled_(false), |
@@ -204,12 +201,14 @@ HostNPScriptObject::It2MeImpl::It2MeImpl( |
void HostNPScriptObject::It2MeImpl::Connect( |
const std::string& uid, |
const std::string& auth_token, |
- const std::string& auth_service) { |
+ const std::string& auth_service, |
+ const UiStrings& ui_strings) { |
if (!host_context_->ui_task_runner()->BelongsToCurrentThread()) { |
DCHECK(plugin_task_runner_->BelongsToCurrentThread()); |
host_context_->ui_task_runner()->PostTask( |
FROM_HERE, |
- base::Bind(&It2MeImpl::Connect, this, uid, auth_token, auth_service)); |
+ base::Bind(&It2MeImpl::Connect, this, uid, auth_token, auth_service, |
+ ui_strings)); |
return; |
} |
@@ -226,7 +225,7 @@ void HostNPScriptObject::It2MeImpl::Connect( |
// The UserInterface object needs to be created on the UI thread. |
it2me_host_user_interface_.reset( |
new It2MeHostUserInterface(host_context_->network_task_runner(), |
- host_context_->ui_task_runner())); |
+ host_context_->ui_task_runner(), ui_strings)); |
it2me_host_user_interface_->Init(); |
// Switch to the network thread to start the actual connection. |
@@ -380,9 +379,6 @@ void HostNPScriptObject::It2MeImpl::FinishConnect( |
protocol::CandidateSessionConfig::DisableAudioChannel(protocol_config.get()); |
host_->set_protocol_config(protocol_config.Pass()); |
- // Provide localization strings to the host. |
- host_->SetUiStrings(ui_strings_); |
- |
// Create user interface. |
it2me_host_user_interface_->Start(host_.get(), |
base::Bind(&It2MeImpl::Disconnect, this)); |
@@ -953,8 +949,8 @@ bool HostNPScriptObject::Connect(const NPVariant* args, |
// Create the It2Me host implementation and start connecting. |
it2me_impl_ = new It2MeImpl( |
- host_context.Pass(), plugin_task_runner_, weak_ptr_, ui_strings_); |
- it2me_impl_->Connect(uid, auth_token, auth_service); |
+ host_context.Pass(), plugin_task_runner_, weak_ptr_); |
+ it2me_impl_->Connect(uid, auth_token, auth_service, ui_strings_); |
return true; |
} |