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

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

Issue 8573024: Clean up client state callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.h ('k') | remoting/webapp/me2mom/client_screen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 91a82b135bb20ae7d5a94d2a3eaa8e9daa6d3530..a9a60d5dc5a14ca7b4ad1068e924fc69ad5b032c 100644
--- a/remoting/client/plugin/chromoting_scriptable_object.cc
+++ b/remoting/client/plugin/chromoting_scriptable_object.cc
@@ -246,7 +246,7 @@ void ChromotingScriptableObject::SetConnectionStatus(
}
if (signal)
- SignalConnectionInfoChange();
+ SignalConnectionInfoChange(status, error);
}
void ChromotingScriptableObject::LogDebugInfo(const std::string& info) {
@@ -299,10 +299,12 @@ void ChromotingScriptableObject::AddMethod(const std::string& name,
properties_.push_back(PropertyDescriptor(name, handler));
}
-void ChromotingScriptableObject::SignalConnectionInfoChange() {
+void ChromotingScriptableObject::SignalConnectionInfoChange(int status,
+ int error) {
plugin_message_loop_->PostTask(
FROM_HERE, task_factory_.NewRunnableMethod(
- &ChromotingScriptableObject::DoSignalConnectionInfoChange));
+ &ChromotingScriptableObject::DoSignalConnectionInfoChange,
+ status, error));
}
void ChromotingScriptableObject::SignalDesktopSizeChange() {
@@ -311,12 +313,13 @@ void ChromotingScriptableObject::SignalDesktopSizeChange() {
&ChromotingScriptableObject::DoSignalDesktopSizeChange));
}
-void ChromotingScriptableObject::DoSignalConnectionInfoChange() {
+void ChromotingScriptableObject::DoSignalConnectionInfoChange(int status,
+ int error) {
Var exception;
VarPrivate cb = GetProperty(Var(kConnectionInfoUpdate), &exception);
// |this| must not be touched after Call() returns.
- cb.Call(Var(), &exception);
+ cb.Call(Var(), Var(status), Var(error), &exception);
if (!exception.is_undefined())
LOG(ERROR) << "Exception when invoking connectionInfoUpdate JS callback.";
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.h ('k') | remoting/webapp/me2mom/client_screen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698