| Index: remoting/client/plugin/chromoting_instance.cc
|
| diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
|
| index 0cdfe62fd0b436081a21bb8692d66d5004d183e2..6905ff83da106f376381cb9a890981654b60fb84 100644
|
| --- a/remoting/client/plugin/chromoting_instance.cc
|
| +++ b/remoting/client/plugin/chromoting_instance.cc
|
| @@ -101,6 +101,7 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
|
| // Kick off the connection.
|
| client_->Start();
|
|
|
| + LogDebugInfo("Connection status: Initializing");
|
| GetScriptableObject()->SetConnectionInfo(STATUS_INITIALIZING,
|
| QUALITY_UNKNOWN);
|
| }
|
| @@ -113,6 +114,7 @@ void ChromotingInstance::Disconnect() {
|
| client_->Stop();
|
| }
|
|
|
| + LogDebugInfo("Connection status: Closed");
|
| GetScriptableObject()->SetConnectionInfo(STATUS_CLOSED, QUALITY_UNKNOWN);
|
| }
|
|
|
| @@ -122,8 +124,8 @@ void ChromotingInstance::ViewChanged(const pp::Rect& position,
|
|
|
| // TODO(ajwong): This is going to be a race condition when the view changes
|
| // and we're in the middle of a Paint().
|
| - VLOG(1) << "ViewChanged " << position.x() << "," << position.y() << ","
|
| - << position.width() << "," << position.height();
|
| + LogDebugInfo(StringPrintf("ViewChanged: %d,%d %dx%d", position.x(),
|
| + position.y(), position.width(), position.height()));
|
|
|
| view_->SetViewport(position.x(), position.y(),
|
| position.width(), position.height());
|
| @@ -187,7 +189,7 @@ ChromotingScriptableObject* ChromotingInstance::GetScriptableObject() {
|
| DCHECK(so != NULL);
|
| return static_cast<ChromotingScriptableObject*>(so);
|
| }
|
| - LOG(ERROR) << "Unable to get ScriptableObject for Chromoting plugin.";
|
| + LogDebugError("Unable to get ScriptableObject for Chromoting plugin.");
|
| return NULL;
|
| }
|
|
|
| @@ -205,9 +207,21 @@ void ChromotingInstance::SubmitLoginInfo(const std::string& username,
|
| }
|
|
|
| void ChromotingInstance::LogDebugInfo(const std::string& info) {
|
| + LOG(INFO) << info;
|
| GetScriptableObject()->LogDebugInfo(info);
|
| }
|
|
|
| +void ChromotingInstance::LogDebugWarning(const std::string& info) {
|
| + LOG(WARNING) << info;
|
| + GetScriptableObject()->LogDebugInfo(
|
| + StringPrintf("WARNING : %s", info.c_str()));
|
| +}
|
| +
|
| +void ChromotingInstance::LogDebugError(const std::string& info) {
|
| + LOG(ERROR) << info;
|
| + GetScriptableObject()->LogDebugInfo(StringPrintf("ERROR : %s", info.c_str()));
|
| +}
|
| +
|
| pp::Var ChromotingInstance::GetInstanceObject() {
|
| if (instance_object_.is_undefined()) {
|
| ChromotingScriptableObject* object = new ChromotingScriptableObject(this);
|
|
|