summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
Diffstat (limited to 'remoting')
-rw-r--r--remoting/client/appengine/static_files/chromoting_session.js2
-rw-r--r--remoting/client/chromoting_client.cc14
-rw-r--r--remoting/client/chromoting_client.h3
-rw-r--r--remoting/client/client_logger.cc46
-rw-r--r--remoting/client/client_logger.h31
-rw-r--r--remoting/client/plugin/chromoting_instance.cc53
-rw-r--r--remoting/client/plugin/chromoting_instance.h6
-rw-r--r--remoting/client/plugin/pepper_client_logger.cc76
-rw-r--r--remoting/client/plugin/pepper_client_logger.h40
-rw-r--r--remoting/client/plugin/pepper_view.cc18
-rw-r--r--remoting/client/x11_client.cc5
-rw-r--r--remoting/remoting.gyp4
12 files changed, 267 insertions, 31 deletions
diff --git a/remoting/client/appengine/static_files/chromoting_session.js b/remoting/client/appengine/static_files/chromoting_session.js
index 7c2a8b9..6a95f7d 100644
--- a/remoting/client/appengine/static_files/chromoting_session.js
+++ b/remoting/client/appengine/static_files/chromoting_session.js
@@ -19,6 +19,7 @@ chromoting.connectMethod = 'sandboxed';
// to the plugin.
function feedIq() {
var xhr = new XMLHttpRequest();
+ addToDebugLog("xmpp proxy: " + chromoting.httpXmppProxy);
xhr.open("GET", chromoting.httpXmppProxy + '/readIq?host_jid=' +
encodeURIComponent(document.hostjid), true);
xhr.withCredentials = true;
@@ -42,6 +43,7 @@ function feedIq() {
function registerConnection() {
var xhr = new XMLHttpRequest();
+ addToDebugLog("xmpp proxy: " + chromoting.httpXmppProxy);
xhr.open("POST", chromoting.httpXmppProxy + '/newConnection', true);
xhr.withCredentials = true;
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index 72cf9f1..a46409b 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -8,6 +8,7 @@
#include "remoting/base/tracer.h"
#include "remoting/client/chromoting_view.h"
#include "remoting/client/client_context.h"
+#include "remoting/client/client_logger.h"
#include "remoting/client/input_handler.h"
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/protocol/connection_to_host.h"
@@ -21,6 +22,7 @@ ChromotingClient::ChromotingClient(const ClientConfig& config,
ChromotingView* view,
RectangleUpdateDecoder* rectangle_decoder,
InputHandler* input_handler,
+ ClientLogger* logger,
Task* client_done)
: config_(config),
context_(context),
@@ -28,6 +30,7 @@ ChromotingClient::ChromotingClient(const ClientConfig& config,
view_(view),
rectangle_decoder_(rectangle_decoder),
input_handler_(input_handler),
+ logger_(logger),
client_done_(client_done),
state_(CREATED),
packet_being_processed_(false),
@@ -182,18 +185,18 @@ void ChromotingClient::DispatchPacket() {
}
void ChromotingClient::OnConnectionOpened(protocol::ConnectionToHost* conn) {
- VLOG(1) << "ChromotingClient::OnConnectionOpened";
+ logger_->VLog(1, "ChromotingClient::OnConnectionOpened");
Initialize();
SetConnectionState(CONNECTED);
}
void ChromotingClient::OnConnectionClosed(protocol::ConnectionToHost* conn) {
- VLOG(1) << "ChromotingClient::OnConnectionClosed";
+ logger_->VLog(1, "ChromotingClient::OnConnectionClosed");
SetConnectionState(DISCONNECTED);
}
void ChromotingClient::OnConnectionFailed(protocol::ConnectionToHost* conn) {
- VLOG(1) << "ChromotingClient::OnConnectionFailed";
+ logger_->VLog(1, "ChromotingClient::OnConnectionFailed");
SetConnectionState(FAILED);
}
@@ -261,7 +264,7 @@ void ChromotingClient::Initialize() {
// Resize the window.
int width = config->initial_resolution().width;
int height = config->initial_resolution().height;
- VLOG(1) << "Initial screen geometry: " << width << "x" << height;
+ logger_->VLog(1, "Initial screen geometry: %dx%d", width, height);
// TODO(ajwong): What to do here? Does the decoder actually need to request
// the right frame size? This is mainly an optimization right?
@@ -279,6 +282,7 @@ void ChromotingClient::Initialize() {
// ClientStub control channel interface.
void ChromotingClient::NotifyResolution(
const protocol::NotifyResolutionRequest* msg, Task* done) {
+ logger_->Log(logging::LOG_INFO, "NotifyResolution change");
NOTIMPLEMENTED();
done->Run();
delete done;
@@ -294,6 +298,8 @@ void ChromotingClient::BeginSessionResponse(
return;
}
+ logger_->Log(logging::LOG_INFO, "BeginSessionResponse received");
+
// Inform the connection that the client has been authenticated. This will
// enable the communication channels.
if (msg->success()) {
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index ced3be7..2d394d9 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -30,6 +30,7 @@ class NotifyResolutionRequest;
} // namespace protocol
class ClientContext;
+class ClientLogger;
class InputHandler;
class RectangleUpdateDecoder;
@@ -45,6 +46,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
ChromotingView* view,
RectangleUpdateDecoder* rectangle_decoder,
InputHandler* input_handler,
+ ClientLogger* logger,
Task* client_done);
virtual ~ChromotingClient();
@@ -117,6 +119,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
ChromotingView* view_;
RectangleUpdateDecoder* rectangle_decoder_;
InputHandler* input_handler_;
+ ClientLogger* logger_;
// If non-NULL, this is called when the client is done.
Task* client_done_;
diff --git a/remoting/client/client_logger.cc b/remoting/client/client_logger.cc
new file mode 100644
index 0000000..7870478
--- /dev/null
+++ b/remoting/client/client_logger.cc
@@ -0,0 +1,46 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "client_logger.h"
+
+#include <stdarg.h> // va_list
+
+#include "base/stringprintf.h"
+
+namespace remoting {
+
+ClientLogger::ClientLogger() {
+}
+
+ClientLogger::~ClientLogger() {
+}
+
+void ClientLogger::Log(logging::LogSeverity severity, const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ va_Log(severity, format, ap);
+ va_end(ap);
+}
+
+void ClientLogger::VLog(int verboselevel, const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ va_VLog(verboselevel, format, ap);
+ va_end(ap);
+}
+
+void ClientLogger::va_Log(logging::LogSeverity severity,
+ const char* format, va_list ap) {
+ std::string message;
+ base::StringAppendV(&message, format, ap);
+ logging::LogMessage(__FILE__, __LINE__, severity).stream() << message;
+}
+
+void ClientLogger::va_VLog(int verboselevel, const char* format, va_list ap) {
+ std::string message;
+ base::StringAppendV(&message, format, ap);
+ VLOG(verboselevel) << message;
+}
+
+} // namespace remoting
diff --git a/remoting/client/client_logger.h b/remoting/client/client_logger.h
new file mode 100644
index 0000000..f481c51
--- /dev/null
+++ b/remoting/client/client_logger.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_CLIENT_LOGGER_H_
+#define REMOTING_CLIENT_CLIENT_LOGGER_H_
+
+#include "base/basictypes.h"
+#include "base/logging.h"
+
+namespace remoting {
+
+class ClientLogger {
+ public:
+ ClientLogger();
+ virtual ~ClientLogger();
+
+ void Log(logging::LogSeverity severity, const char* format, ...);
+ void VLog(int verboselevel, const char* format, ...);
+
+ virtual void va_Log(logging::LogSeverity severity,
+ const char* format, va_list ap);
+ virtual void va_VLog(int verboselevel, const char* format, va_list ap);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ClientLogger);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_CLIENT_CLIENT_LOGGER_H_
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 30b3010..3de4145 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -7,6 +7,7 @@
#include <string>
#include <vector>
+#include "base/logging.h"
#include "base/message_loop.h"
#include "base/stringprintf.h"
#include "base/task.h"
@@ -24,6 +25,7 @@
#include "remoting/client/chromoting_client.h"
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
+#include "remoting/client/plugin/pepper_client_logger.h"
#include "remoting/client/plugin/pepper_input_handler.h"
#include "remoting/client/plugin/pepper_port_allocator_session.h"
#include "remoting/client/plugin/pepper_view.h"
@@ -47,7 +49,8 @@ const char* ChromotingInstance::kMimeType = "pepper-application/x-chromoting";
ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
: pp::Instance(pp_instance),
- initialized_(false) {
+ initialized_(false),
+ logger_(this) {
}
ChromotingInstance::~ChromotingInstance() {
@@ -68,7 +71,7 @@ bool ChromotingInstance::Init(uint32_t argc,
CHECK(!initialized_);
initialized_ = true;
- VLOG(1) << "Started ChromotingInstance::Init";
+ logger_.VLog(1, "Started ChromotingInstance::Init");
// Start all the threads.
context_.Start();
@@ -86,7 +89,7 @@ bool ChromotingInstance::Init(uint32_t argc,
// If we don't have socket dispatcher for IPC (e.g. P2P API is
// disabled), then JingleClient will try to use physical sockets.
if (socket_dispatcher) {
- VLOG(1) << "Creating IpcNetworkManager and IpcPacketSocketFactory.";
+ logger_.VLog(1, "Creating IpcNetworkManager and IpcPacketSocketFactory.");
network_manager = new IpcNetworkManager(socket_dispatcher);
socket_factory = new IpcPacketSocketFactory(socket_dispatcher);
}
@@ -112,20 +115,22 @@ bool ChromotingInstance::Init(uint32_t argc,
void ChromotingInstance::Connect(const ClientConfig& config) {
DCHECK(CurrentlyOnPluginThread());
- LogDebugInfo(base::StringPrintf("Connecting to %s as %s",
- config.host_jid.c_str(),
- config.username.c_str()).c_str());
+ logger_.Log(logging::LOG_INFO, "Connecting to %s as %s",
+ config.host_jid.c_str(),
+ config.username.c_str());
client_.reset(new ChromotingClient(config,
&context_,
host_connection_.get(),
view_proxy_,
rectangle_decoder_.get(),
input_handler_.get(),
+ &logger_,
NULL));
// Kick off the connection.
client_->Start();
+ logger_.Log(logging::LOG_INFO, "Connection status: Initializing");
GetScriptableObject()->SetConnectionInfo(STATUS_INITIALIZING,
QUALITY_UNKNOWN);
}
@@ -138,7 +143,7 @@ void ChromotingInstance::ConnectSandboxed(const std::string& your_jid,
// ClientConfig.
DCHECK(CurrentlyOnPluginThread());
- LogDebugInfo("Attempting sandboxed connection");
+ logger_.Log(logging::LOG_INFO, "Attempting sandboxed connection.");
// Setup the XMPP Proxy.
ChromotingScriptableObject* scriptable_object = GetScriptableObject();
@@ -155,6 +160,7 @@ void ChromotingInstance::ConnectSandboxed(const std::string& your_jid,
view_proxy_,
rectangle_decoder_.get(),
input_handler_.get(),
+ &logger_,
NULL));
// Kick off the connection.
@@ -167,7 +173,7 @@ void ChromotingInstance::ConnectSandboxed(const std::string& your_jid,
void ChromotingInstance::Disconnect() {
DCHECK(CurrentlyOnPluginThread());
- LogDebugInfo("Disconnecting from host");
+ logger_.Log(logging::LOG_INFO, "Disconnecting from host.");
if (client_.get()) {
client_->Stop();
}
@@ -181,8 +187,9 @@ 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();
+ logger_.VLog(1, "ViewChanged: %d,%d %dx%d",
+ position.x(), position.y(),
+ position.width(), position.height());
view_->SetViewport(position.x(), position.y(),
position.width(), position.height());
@@ -226,9 +233,9 @@ bool ChromotingInstance::HandleInputEvent(const PP_InputEvent& event) {
case PP_INPUTEVENT_TYPE_KEYDOWN:
case PP_INPUTEVENT_TYPE_KEYUP:
- VLOG(3) << "PP_INPUTEVENT_TYPE_KEY"
- << (event.type==PP_INPUTEVENT_TYPE_KEYDOWN ? "DOWN" : "UP")
- << " key=" << event.u.key.key_code;
+ logger_.VLog(3, "PP_INPUTEVENT_TYPE_KEY%s key=%d",
+ (event.type==PP_INPUTEVENT_TYPE_KEYDOWN ? "DOWN" : "UP"),
+ event.u.key.key_code);
pih->HandleKeyEvent(event.type == PP_INPUTEVENT_TYPE_KEYDOWN,
event.u.key);
return true;
@@ -251,7 +258,8 @@ ChromotingScriptableObject* ChromotingInstance::GetScriptableObject() {
DCHECK(so != NULL);
return static_cast<ChromotingScriptableObject*>(so);
}
- LOG(ERROR) << "Unable to get ScriptableObject for Chromoting plugin.";
+ logger_.Log(logging::LOG_ERROR,
+ "Unable to get ScriptableObject for Chromoting plugin.");
return NULL;
}
@@ -259,7 +267,8 @@ void ChromotingInstance::SubmitLoginInfo(const std::string& username,
const std::string& password) {
if (host_connection_->state() !=
protocol::ConnectionToHost::STATE_CONNECTED) {
- LogDebugInfo("Client not connected or already authenticated.");
+ logger_.Log(logging::LOG_INFO,
+ "Client not connected or already authenticated.");
return;
}
@@ -278,8 +287,18 @@ void ChromotingInstance::SetScaleToFit(bool scale_to_fit) {
view_proxy_->SetScaleToFit(scale_to_fit);
}
-void ChromotingInstance::LogDebugInfo(const std::string& info) {
- GetScriptableObject()->LogDebugInfo(info);
+void ChromotingInstance::Log(int severity, const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ logger_.va_Log(severity, format, ap);
+ va_end(ap);
+}
+
+void ChromotingInstance::VLog(int verboselevel, const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ logger_.va_VLog(verboselevel, format, ap);
+ va_end(ap);
}
pp::Var ChromotingInstance::GetInstanceObject() {
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index c1c68d6..45d250b 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -19,6 +19,7 @@
#include "ppapi/cpp/var.h"
#include "remoting/client/client_context.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
+#include "remoting/client/plugin/pepper_client_logger.h"
#include "remoting/protocol/connection_to_host.h"
class MessageLoop;
@@ -85,7 +86,8 @@ class ChromotingInstance : public pp::Instance {
// Called by ChromotingScriptableObject to set scale-to-fit.
void SetScaleToFit(bool scale_to_fit);
- void LogDebugInfo(const std::string& info);
+ void Log(int severity, const char* format, ...);
+ void VLog(int verboselevel, const char* format, ...);
// Return statistics record by ChromotingClient.
// If no connection is currently active then NULL will be returned.
@@ -118,6 +120,8 @@ class ChromotingInstance : public pp::Instance {
// connection.
scoped_refptr<PepperXmppProxy> xmpp_proxy_;
+ PepperClientLogger logger_;
+
// JavaScript interface to control this instance.
// This wraps a ChromotingScriptableObject in a pp::Var.
pp::Var instance_object_;
diff --git a/remoting/client/plugin/pepper_client_logger.cc b/remoting/client/plugin/pepper_client_logger.cc
new file mode 100644
index 0000000..c2fab45
--- /dev/null
+++ b/remoting/client/plugin/pepper_client_logger.cc
@@ -0,0 +1,76 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/client/plugin/pepper_client_logger.h"
+
+#include <stdarg.h> // va_list
+
+#include "base/logging.h"
+#include "base/message_loop.h"
+#include "base/stringprintf.h"
+#include "remoting/client/plugin/chromoting_instance.h"
+
+namespace remoting {
+
+PepperClientLogger::PepperClientLogger(ChromotingInstance* instance)
+ : instance_(instance),
+ message_loop_(MessageLoop::current()) {
+}
+
+PepperClientLogger::~PepperClientLogger() {
+}
+
+// Copied from base/logging.cc.
+const char* const log_severity_names[logging::LOG_NUM_SEVERITIES] = {
+ "INFO", "WARNING", "ERROR", "ERROR_REPORT", "FATAL" };
+
+void PepperClientLogger::va_Log(logging::LogSeverity severity,
+ const char* format, va_list ap) {
+ DCHECK(severity >= 0 && severity <= logging::LOG_NUM_SEVERITIES);
+
+ // Based in LOG_IS_ON macro in base/logging.h.
+ if (severity >= ::logging::GetMinLogLevel()) {
+ std::string message;
+ base::StringAppendV(&message, format, ap);
+
+ // Standard logging.
+ logging::LogMessage(__FILE__, __LINE__, severity).stream() << message;
+
+ // Send log message to the Chromoting instance so that it can be sent to the
+ // client UI.
+ LogToClientUI(StringPrintf("LOG(%s) %s",
+ log_severity_names[severity], message.c_str()));
+ }
+
+ va_end(ap);
+}
+
+void PepperClientLogger::va_VLog(int verboselevel,
+ const char* format,
+ va_list ap) {
+ if (VLOG_IS_ON(verboselevel)) {
+ std::string message;
+ base::StringAppendV(&message, format, ap);
+
+ // Standard verbose logging.
+ VLOG(verboselevel) << message;
+
+ // Send log message to the Chromoting instance so that it can be sent to the
+ // client UI.
+ LogToClientUI(StringPrintf("VLOG(%d) %s", verboselevel, message.c_str()));
+ }
+}
+
+void PepperClientLogger::LogToClientUI(const std::string& message) {
+ if (message_loop_ != MessageLoop::current()) {
+ message_loop_->PostTask(
+ FROM_HERE,
+ NewRunnableMethod(this, &PepperClientLogger::LogToClientUI, message));
+ return;
+ }
+
+ instance_->GetScriptableObject()->LogDebugInfo(message);
+}
+
+} // namespace remoting
diff --git a/remoting/client/plugin/pepper_client_logger.h b/remoting/client/plugin/pepper_client_logger.h
new file mode 100644
index 0000000..c953e71
--- /dev/null
+++ b/remoting/client/plugin/pepper_client_logger.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_PLUGIN_PEPPER_CLIENT_LOGGER_H_
+#define REMOTING_CLIENT_PLUGIN_PEPPER_CLIENT_LOGGER_H_
+
+#include "remoting/client/client_logger.h"
+
+#include "base/task.h"
+
+class MessageLoop;
+
+namespace remoting {
+
+class ChromotingInstance;
+
+class PepperClientLogger : public ClientLogger {
+ public:
+ PepperClientLogger(ChromotingInstance* instance);
+ virtual ~PepperClientLogger();
+
+ virtual void va_Log(logging::LogSeverity severity, const char* format,
+ va_list ap);
+ virtual void va_VLog(int verboselevel, const char* format, va_list ap);
+
+ private:
+ void LogToClientUI(const std::string& message);
+
+ ChromotingInstance* instance_;
+ MessageLoop* message_loop_;
+
+ DISALLOW_COPY_AND_ASSIGN(PepperClientLogger);
+};
+
+} // namespace remoting
+
+DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::PepperClientLogger);
+
+#endif // REMOTING_CLIENT_PLUGIN_PEPPER_CLIENT_LOGGER_H_
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index 54b8344..714c1e0 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -5,6 +5,7 @@
#include "remoting/client/plugin/pepper_view.h"
#include "base/message_loop.h"
+#include "base/string_util.h"
#include "ppapi/cpp/graphics_2d.h"
#include "ppapi/cpp/image_data.h"
#include "ppapi/cpp/point.h"
@@ -53,13 +54,15 @@ void PepperView::Paint() {
// TODO(ajwong): We're assuming the native format is BGRA_PREMUL below. This
// is wrong.
if (is_static_fill_) {
- LOG(ERROR) << "Static filling " << static_fill_color_;
+ instance_->Log(logging::LOG_INFO,
+ "Static filling %08x", static_fill_color_);
pp::ImageData image(instance_, pp::ImageData::GetNativeImageDataFormat(),
pp::Size(host_width_, host_height_),
false);
if (image.is_null()) {
- LOG(ERROR) << "Unable to allocate image of size: "
- << host_width_ << "x" << host_height_;
+ instance_->Log(logging::LOG_ERROR,
+ "Unable to allocate image of size: %dx%d",
+ host_width_, host_height_);
return;
}
@@ -95,12 +98,13 @@ void PepperView::PaintFrame(media::VideoFrame* frame, UpdatedRects* rects) {
const int kBytesPerPixel = GetBytesPerPixel(media::VideoFrame::RGB32);
if (!backing_store_.get() || backing_store_->is_null()) {
- LOG(ERROR) << "Backing store is not available.";
+ instance_->Log(logging::LOG_ERROR, "Backing store is not available.");
return;
}
if (DoScaling()) {
if (!scaled_backing_store_.get() || scaled_backing_store_->is_null()) {
- LOG(ERROR) << "Scaled backing store is not available.";
+ instance_->Log(logging::LOG_ERROR,
+ "Scaled backing store is not available.");
}
}
@@ -341,7 +345,7 @@ void PepperView::ResizeInternals() {
pp::Size(host_width_, host_height_),
false);
if (!instance_->BindGraphics(graphics2d_)) {
- LOG(ERROR) << "Couldn't bind the device context.";
+ instance_->Log(logging::LOG_ERROR, "Couldn't bind the device context.");
return;
}
@@ -441,7 +445,7 @@ void PepperView::ReleaseFrame(media::VideoFrame* frame) {
DCHECK(CurrentlyOnPluginThread());
if (frame) {
- LOG(WARNING) << "Frame released.";
+ instance_->Log(logging::LOG_WARNING, "Frame released.");
frame->Release();
}
}
diff --git a/remoting/client/x11_client.cc b/remoting/client/x11_client.cc
index 4fffa7b..f56d2b1 100644
--- a/remoting/client/x11_client.cc
+++ b/remoting/client/x11_client.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -11,6 +11,7 @@
#include "remoting/client/chromoting_client.h"
#include "remoting/client/client_config.h"
#include "remoting/client/client_context.h"
+#include "remoting/client/client_logger.h"
#include "remoting/client/client_util.h"
#include "remoting/client/rectangle_update_decoder.h"
#include "remoting/client/x11_view.h"
@@ -41,7 +42,7 @@ int main(int argc, char** argv) {
remoting::X11InputHandler input_handler(&context, &connection, &view);
remoting::ChromotingClient client(
config, &context, &connection, &view, rectangle_decoder, &input_handler,
- NewRunnableFunction(&ClientQuit, &ui_loop));
+ new remoting::ClientLogger(), NewRunnableFunction(&ClientQuit, &ui_loop));
// Run the client on a new MessageLoop until
context.Start();
diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp
index 1203522..b0ad56b 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -117,6 +117,8 @@
'client/plugin/chromoting_instance.h',
'client/plugin/chromoting_scriptable_object.cc',
'client/plugin/chromoting_scriptable_object.h',
+ 'client/plugin/pepper_client_logger.cc',
+ 'client/plugin/pepper_client_logger.h',
'client/plugin/pepper_entrypoints.cc',
'client/plugin/pepper_entrypoints.h',
'client/plugin/pepper_input_handler.cc',
@@ -390,6 +392,8 @@
'client/client_config.h',
'client/client_context.cc',
'client/client_context.h',
+ 'client/client_logger.cc',
+ 'client/client_logger.h',
'client/client_util.cc',
'client/client_util.h',
'client/frame_consumer.h',