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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 Response PageHandler::StopScreencast() { | 403 Response PageHandler::StopScreencast() { |
404 screencast_enabled_ = false; | 404 screencast_enabled_ = false; |
405 UpdateTouchEventEmulationState(); | 405 UpdateTouchEventEmulationState(); |
406 return Response::FallThrough(); | 406 return Response::FallThrough(); |
407 } | 407 } |
408 | 408 |
409 Response PageHandler::StartRecordingFrames(int max_frame_count) { | 409 Response PageHandler::StartRecordingFrames(int max_frame_count) { |
410 return frame_recorder_->StartRecordingFrames(max_frame_count); | 410 return frame_recorder_->StartRecordingFrames(max_frame_count); |
411 } | 411 } |
412 | 412 |
413 Response PageHandler::StopRecordingFrames(DevToolsCommandId command_id) { | 413 Response PageHandler::StopRecordingFrames( |
| 414 DevToolsCommandId command_id, const bool* cancel) { |
414 return frame_recorder_->StopRecordingFrames(base::Bind( | 415 return frame_recorder_->StopRecordingFrames(base::Bind( |
415 &PageHandler::OnFramesRecorded, base::Unretained(this), command_id)); | 416 &PageHandler::OnFramesRecorded, base::Unretained(this), command_id), |
| 417 cancel && *cancel); |
416 } | 418 } |
417 | 419 |
418 Response PageHandler::ScreencastFrameAck(int frame_number) { | 420 Response PageHandler::ScreencastFrameAck(int frame_number) { |
419 screencast_frame_acked_ = frame_number; | 421 screencast_frame_acked_ = frame_number; |
420 return Response::OK(); | 422 return Response::OK(); |
421 } | 423 } |
422 | 424 |
423 Response PageHandler::HandleJavaScriptDialog(bool accept, | 425 Response PageHandler::HandleJavaScriptDialog(bool accept, |
424 const std::string* prompt_text) { | 426 const std::string* prompt_text) { |
425 base::string16 prompt_override; | 427 base::string16 prompt_override; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 | 634 |
633 void PageHandler::QueryUsageAndQuotaCompleted( | 635 void PageHandler::QueryUsageAndQuotaCompleted( |
634 DevToolsCommandId command_id, | 636 DevToolsCommandId command_id, |
635 scoped_refptr<QueryUsageAndQuotaResponse> response_data) { | 637 scoped_refptr<QueryUsageAndQuotaResponse> response_data) { |
636 client_->SendQueryUsageAndQuotaResponse(command_id, response_data); | 638 client_->SendQueryUsageAndQuotaResponse(command_id, response_data); |
637 } | 639 } |
638 | 640 |
639 } // namespace page | 641 } // namespace page |
640 } // namespace devtools | 642 } // namespace devtools |
641 } // namespace content | 643 } // namespace content |
OLD | NEW |