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

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: Created 9 years, 10 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 6bc45086792b43bac1e440ddae002ecfad470e1f..4450979de805e8f31476fbcc0667ee8b4a41366b 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"
@@ -47,13 +48,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_->LogDebugError(
+ StringPrintf("Static filling %08x", static_fill_color_));
pp::ImageData image(instance_, pp::ImageData::GetNativeImageDataFormat(),
pp::Size(viewport_width_, viewport_height_),
false);
if (image.is_null()) {
- LOG(ERROR) << "Unable to allocate image of size: "
- << viewport_width_ << "x" << viewport_height_;
+ instance_->LogDebugError(
+ StringPrintf("Unable to allocate image of size: %dx%d",
+ viewport_width_, viewport_height_));
return;
}
@@ -100,8 +103,9 @@ void PepperView::PaintFrame(media::VideoFrame* frame, UpdatedRects* rects) {
pp::Size(r.width(), r.height()),
false);
if (image.is_null()) {
- LOG(ERROR) << "Unable to allocate image of size: "
- << r.width() << "x" << r.height();
+ instance_->LogDebugError(
+ StringPrintf("Unable to allocate image of size: %dx%d",
+ r.width(), r.height()));
return;
}
@@ -188,7 +192,7 @@ void PepperView::SetViewport(int x, int y, int width, int height) {
pp::Size(viewport_width_, viewport_height_),
false);
if (!instance_->BindGraphics(graphics2d_)) {
- LOG(ERROR) << "Couldn't bind the device context.";
+ instance_->LogDebugError("Couldn't bind the device context.");
return;
}
@@ -221,7 +225,7 @@ void PepperView::ReleaseFrame(media::VideoFrame* frame) {
DCHECK(instance_->CurrentlyOnPluginThread());
if (frame) {
- LOG(WARNING) << "Frame released.";
+ instance_->LogDebugError("Frame released.");
frame->Release();
}
}
« remoting/client/plugin/chromoting_instance.h ('K') | « remoting/client/plugin/chromoting_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698