| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/buffered_resource_loader.h" | 5 #include "content/renderer/media/buffered_resource_loader.h" |
| 6 | 6 |
| 7 #include "base/bits.h" | 7 #include "base/bits.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 offset_ += first_offset_ + excess; | 461 offset_ += first_offset_ + excess; |
| 462 } | 462 } |
| 463 | 463 |
| 464 // Notify latest progress and buffered offset. | 464 // Notify latest progress and buffered offset. |
| 465 progress_cb_.Run(offset_ + buffer_.forward_bytes() - 1); | 465 progress_cb_.Run(offset_ + buffer_.forward_bytes() - 1); |
| 466 Log(); | 466 Log(); |
| 467 } | 467 } |
| 468 | 468 |
| 469 void BufferedResourceLoader::didDownloadData( | 469 void BufferedResourceLoader::didDownloadData( |
| 470 WebKit::WebURLLoader* loader, | 470 WebKit::WebURLLoader* loader, |
| 471 int dataLength) { | 471 int dataLength, |
| 472 int encoded_data_length) { |
| 472 NOTIMPLEMENTED(); | 473 NOTIMPLEMENTED(); |
| 473 } | 474 } |
| 474 | 475 |
| 475 void BufferedResourceLoader::didReceiveCachedMetadata( | 476 void BufferedResourceLoader::didReceiveCachedMetadata( |
| 476 WebURLLoader* loader, | 477 WebURLLoader* loader, |
| 477 const char* data, | 478 const char* data, |
| 478 int data_length) { | 479 int data_length) { |
| 479 NOTIMPLEMENTED(); | 480 NOTIMPLEMENTED(); |
| 480 } | 481 } |
| 481 | 482 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 795 |
| 795 void BufferedResourceLoader::Log() { | 796 void BufferedResourceLoader::Log() { |
| 796 media_log_->AddEvent( | 797 media_log_->AddEvent( |
| 797 media_log_->CreateBufferedExtentsChangedEvent( | 798 media_log_->CreateBufferedExtentsChangedEvent( |
| 798 offset_ - buffer_.backward_bytes(), | 799 offset_ - buffer_.backward_bytes(), |
| 799 offset_, | 800 offset_, |
| 800 offset_ + buffer_.forward_bytes())); | 801 offset_ + buffer_.forward_bytes())); |
| 801 } | 802 } |
| 802 | 803 |
| 803 } // namespace content | 804 } // namespace content |
| OLD | NEW |