summaryrefslogtreecommitdiffstats
path: root/remoting/host/plugin/host_script_object.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 00:55:22 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 00:55:22 +0000
commit3f87dad482089e8df379db64d9647d5674d90175 (patch)
treec1e289d0e033fc53065469d8bedd6e596a63df68 /remoting/host/plugin/host_script_object.cc
parent7a48a13bc6fc3464c5dca7e088290462b5110248 (diff)
downloadchromium_src-3f87dad482089e8df379db64d9647d5674d90175.zip
chromium_src-3f87dad482089e8df379db64d9647d5674d90175.tar.gz
chromium_src-3f87dad482089e8df379db64d9647d5674d90175.tar.bz2
Create UserInterface object on the UI thread.
Now UserInterface objects weak pointer to itself that is created in the constructor. That weak pointer is used on the UI thread, so it needs to be created on UI thread too. Review URL: https://chromiumcodereview.appspot.com/10543068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/plugin/host_script_object.cc')
-rw-r--r--remoting/host/plugin/host_script_object.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index fd3fa55..9158752 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -456,6 +456,10 @@ bool HostNPScriptObject::Connect(const NPVariant* args,
return false;
}
+ // The UserInterface object needs to be created on the UI thread.
+ it2me_host_user_interface_.reset(
+ new It2MeHostUserInterface(host_context_.get()));
+
ReadPolicyAndConnect(uid, auth_token, auth_service);
return true;
@@ -562,8 +566,6 @@ void HostNPScriptObject::FinishConnectNetworkThread(
base::Closure disconnect_callback = base::Bind(
&ChromotingHost::Shutdown, base::Unretained(host_.get()),
base::Closure());
- it2me_host_user_interface_.reset(
- new It2MeHostUserInterface(host_context_.get()));
it2me_host_user_interface_->Start(host_.get(), disconnect_callback);
{