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

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

Issue 6621018: Convert Chromoting plugin logging to appear in client UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments, round 1 Created 9 years, 7 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/pepper_view.cc
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index 54b83446929db3fee933277fc6015f28edf3d335..714c1e0dd2e7b2539e77fe7f8b5f5a532d08e50a 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();
}
}

Powered by Google App Engine
This is Rietveld 408576698