| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/devtools/protocol/page_handler.h" | 5 #include "content/browser/devtools/protocol/page_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 screencast_quality_, | 472 screencast_quality_, |
| 473 last_compositor_frame_metadata_), | 473 last_compositor_frame_metadata_), |
| 474 kN32_SkColorType); | 474 kN32_SkColorType); |
| 475 } | 475 } |
| 476 } | 476 } |
| 477 | 477 |
| 478 void PageHandler::ScreencastFrameCaptured( | 478 void PageHandler::ScreencastFrameCaptured( |
| 479 const std::string& format, | 479 const std::string& format, |
| 480 int quality, | 480 int quality, |
| 481 const cc::CompositorFrameMetadata& metadata, | 481 const cc::CompositorFrameMetadata& metadata, |
| 482 bool success, | 482 const SkBitmap& bitmap, |
| 483 const SkBitmap& bitmap) { | 483 const ReadbackResponse& response) { |
| 484 if (!success) { | 484 if (response != READBACK_SUCCESS) { |
| 485 if (capture_retry_count_) { | 485 if (capture_retry_count_) { |
| 486 --capture_retry_count_; | 486 --capture_retry_count_; |
| 487 base::MessageLoop::current()->PostDelayedTask( | 487 base::MessageLoop::current()->PostDelayedTask( |
| 488 FROM_HERE, | 488 FROM_HERE, |
| 489 base::Bind(&PageHandler::InnerSwapCompositorFrame, | 489 base::Bind(&PageHandler::InnerSwapCompositorFrame, |
| 490 weak_factory_.GetWeakPtr()), | 490 weak_factory_.GetWeakPtr()), |
| 491 base::TimeDelta::FromMilliseconds(kFrameRateThresholdMs)); | 491 base::TimeDelta::FromMilliseconds(kFrameRateThresholdMs)); |
| 492 } | 492 } |
| 493 return; | 493 return; |
| 494 } | 494 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 | 597 |
| 598 void PageHandler::QueryUsageAndQuotaCompleted( | 598 void PageHandler::QueryUsageAndQuotaCompleted( |
| 599 scoped_refptr<DevToolsProtocol::Command> command, | 599 scoped_refptr<DevToolsProtocol::Command> command, |
| 600 scoped_ptr<QueryUsageAndQuotaResponse> response_data) { | 600 scoped_ptr<QueryUsageAndQuotaResponse> response_data) { |
| 601 client_->SendQueryUsageAndQuotaResponse(command, *response_data); | 601 client_->SendQueryUsageAndQuotaResponse(command, *response_data); |
| 602 } | 602 } |
| 603 | 603 |
| 604 } // namespace page | 604 } // namespace page |
| 605 } // namespace devtools | 605 } // namespace devtools |
| 606 } // namespace content | 606 } // namespace content |
| OLD | NEW |