| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/client/plugin/client.h" | 5 #include "remoting/client/plugin/client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <iostream> // TODO(garykac): Remove this or replace with debug log. | 8 #include <iostream> // TODO(garykac): Remove this or replace with debug log. |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 plugin_ = plugin; | 21 plugin_ = plugin; |
| 22 host_ = new HostConnection(); | 22 host_ = new HostConnection(); |
| 23 verbose_ = true; | 23 verbose_ = true; |
| 24 } | 24 } |
| 25 | 25 |
| 26 ChromotingClient::~ChromotingClient() { | 26 ChromotingClient::~ChromotingClient() { |
| 27 } | 27 } |
| 28 | 28 |
| 29 void ChromotingClient::hexdump(void* ptr, int buflen) { | 29 void ChromotingClient::hexdump(void* ptr, int buflen) { |
| 30 unsigned char* buf = static_cast<unsigned char*>(ptr); | 30 unsigned char* buf = static_cast<unsigned char*>(ptr); |
| 31 int i, j; | |
| 32 for (int i = 0; i < buflen; i += 16) { | 31 for (int i = 0; i < buflen; i += 16) { |
| 33 printf("%06x: ", i); | 32 printf("%06x: ", i); |
| 34 for (int j = 0; j < 16; j ++) | 33 for (int j = 0; j < 16; j ++) |
| 35 if ((i + j) < buflen) | 34 if ((i + j) < buflen) |
| 36 printf("%02x ", buf[i + j]); | 35 printf("%02x ", buf[i + j]); |
| 37 else | 36 else |
| 38 printf(" "); | 37 printf(" "); |
| 39 printf(" "); | 38 printf(" "); |
| 40 for (int j = 0; j < 16; j++) | 39 for (int j = 0; j < 16; j++) |
| 41 if ((i + j) < buflen) | 40 if ((i + j) < buflen) |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // Raw YUV data is no longer needed. | 382 // Raw YUV data is no longer needed. |
| 384 delete raw_data; | 383 delete raw_data; |
| 385 return true; | 384 return true; |
| 386 #endif | 385 #endif |
| 387 } | 386 } |
| 388 | 387 |
| 389 return false; | 388 return false; |
| 390 } | 389 } |
| 391 | 390 |
| 392 } // namespace remoting | 391 } // namespace remoting |
| OLD | NEW |