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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 screencast_quality_, | 476 screencast_quality_, |
477 last_compositor_frame_metadata_), | 477 last_compositor_frame_metadata_), |
478 kN32_SkColorType); | 478 kN32_SkColorType); |
479 } | 479 } |
480 } | 480 } |
481 | 481 |
482 void PageHandler::ScreencastFrameCaptured( | 482 void PageHandler::ScreencastFrameCaptured( |
483 const std::string& format, | 483 const std::string& format, |
484 int quality, | 484 int quality, |
485 const cc::CompositorFrameMetadata& metadata, | 485 const cc::CompositorFrameMetadata& metadata, |
486 bool success, | 486 const SkBitmap& bitmap, |
487 const SkBitmap& bitmap) { | 487 ReadbackResponse response) { |
488 if (!success) { | 488 if (response != READBACK_SUCCESS) { |
489 if (capture_retry_count_) { | 489 if (capture_retry_count_) { |
490 --capture_retry_count_; | 490 --capture_retry_count_; |
491 base::MessageLoop::current()->PostDelayedTask( | 491 base::MessageLoop::current()->PostDelayedTask( |
492 FROM_HERE, | 492 FROM_HERE, |
493 base::Bind(&PageHandler::InnerSwapCompositorFrame, | 493 base::Bind(&PageHandler::InnerSwapCompositorFrame, |
494 weak_factory_.GetWeakPtr()), | 494 weak_factory_.GetWeakPtr()), |
495 base::TimeDelta::FromMilliseconds(kFrameRateThresholdMs)); | 495 base::TimeDelta::FromMilliseconds(kFrameRateThresholdMs)); |
496 } | 496 } |
497 return; | 497 return; |
498 } | 498 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 591 |
592 void PageHandler::QueryUsageAndQuotaCompleted( | 592 void PageHandler::QueryUsageAndQuotaCompleted( |
593 scoped_refptr<DevToolsProtocol::Command> command, | 593 scoped_refptr<DevToolsProtocol::Command> command, |
594 scoped_refptr<QueryUsageAndQuotaResponse> response_data) { | 594 scoped_refptr<QueryUsageAndQuotaResponse> response_data) { |
595 client_->SendQueryUsageAndQuotaResponse(command, response_data); | 595 client_->SendQueryUsageAndQuotaResponse(command, response_data); |
596 } | 596 } |
597 | 597 |
598 } // namespace page | 598 } // namespace page |
599 } // namespace devtools | 599 } // namespace devtools |
600 } // namespace content | 600 } // namespace content |
OLD | NEW |