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

Unified Diff: remoting/client/plugin/chromoting_scriptable_object.cc

Issue 7730002: Call SendIq() from plugin asynchronously. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/plugin/chromoting_scriptable_object.cc
diff --git a/remoting/client/plugin/chromoting_scriptable_object.cc b/remoting/client/plugin/chromoting_scriptable_object.cc
index 7970785f1b4f6db7e4ecad1d1b884191099bdea5..d611301faa24a7bb52bf936a608e91f221eab3f2 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -272,6 +272,22 @@ void ChromotingScriptableObject::SetDesktopSize(int width, int height) {
LOG(INFO) << "Update desktop size to: " << width << " x " << height;
}
+void ChromotingScriptableObject::SignalLoginChallenge() {
+ plugin_message_loop_->PostTask(
+ FROM_HERE, task_factory_.NewRunnableMethod(
+ &ChromotingScriptableObject::DoSignalLoginChallenge));
+}
+
+void ChromotingScriptableObject::AttachXmppProxy(PepperXmppProxy* xmpp_proxy) {
+ xmpp_proxy_ = xmpp_proxy;
+}
+
+void ChromotingScriptableObject::SendIq(const std::string& message_xml) {
+ plugin_message_loop_->PostTask(
+ FROM_HERE, task_factory_.NewRunnableMethod(
+ &ChromotingScriptableObject::DoSendIq, message_xml));
+}
+
void ChromotingScriptableObject::AddAttribute(const std::string& name,
Var attribute) {
property_names_[name] = properties_.size();
@@ -296,12 +312,6 @@ void ChromotingScriptableObject::SignalDesktopSizeChange() {
&ChromotingScriptableObject::DoSignalDesktopSizeChange));
}
-void ChromotingScriptableObject::SignalLoginChallenge() {
- plugin_message_loop_->PostTask(
- FROM_HERE, task_factory_.NewRunnableMethod(
- &ChromotingScriptableObject::DoSignalLoginChallenge));
-}
-
void ChromotingScriptableObject::DoSignalConnectionInfoChange() {
Var exception;
VarPrivate cb = GetProperty(Var(kConnectionInfoUpdate), &exception);
@@ -314,7 +324,6 @@ void ChromotingScriptableObject::DoSignalConnectionInfoChange() {
LOG(ERROR) << "Exception when invoking connectionInfoUpdate JS callback.";
}
-
void ChromotingScriptableObject::DoSignalDesktopSizeChange() {
Var exception;
VarPrivate cb = GetProperty(Var(kDesktopSizeUpdate), &exception);
@@ -341,11 +350,7 @@ void ChromotingScriptableObject::DoSignalLoginChallenge() {
LOG(ERROR) << "Exception when invoking loginChallenge JS callback.";
}
-void ChromotingScriptableObject::AttachXmppProxy(PepperXmppProxy* xmpp_proxy) {
- xmpp_proxy_ = xmpp_proxy;
-}
-
-void ChromotingScriptableObject::SendIq(const std::string& message_xml) {
+void ChromotingScriptableObject::DoSendIq(const std::string& message_xml) {
Wez 2011/08/24 20:44:45 It's probably worth replacing the "Var() means..."
Sergey Ulanov 2011/08/24 22:42:22 Done.
Var exception;
VarPrivate cb = GetProperty(Var(kSendIq), &exception);

Powered by Google App Engine
This is Rietveld 408576698