| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 frames_in_flight_ = 0; | 311 frames_in_flight_ = 0; |
| 312 capture_every_nth_frame_ = | 312 capture_every_nth_frame_ = |
| 313 every_nth_frame && *every_nth_frame ? *every_nth_frame : 1; | 313 every_nth_frame && *every_nth_frame ? *every_nth_frame : 1; |
| 314 | 314 |
| 315 bool visible = !widget_host->is_hidden(); | 315 bool visible = !widget_host->is_hidden(); |
| 316 NotifyScreencastVisibility(visible); | 316 NotifyScreencastVisibility(visible); |
| 317 if (visible) { | 317 if (visible) { |
| 318 if (has_compositor_frame_metadata_) { | 318 if (has_compositor_frame_metadata_) { |
| 319 InnerSwapCompositorFrame(); | 319 InnerSwapCompositorFrame(); |
| 320 } else { | 320 } else { |
| 321 widget_host->Send( | 321 widget_host->Send(new ViewMsg_ForceRedraw(widget_host->GetRoutingID(), |
| 322 new ViewMsg_ForceRedraw(widget_host->GetRoutingID(), 0)); | 322 ui::LatencyInfo())); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 return Response::FallThrough(); | 325 return Response::FallThrough(); |
| 326 } | 326 } |
| 327 | 327 |
| 328 Response PageHandler::StopScreencast() { | 328 Response PageHandler::StopScreencast() { |
| 329 screencast_enabled_ = false; | 329 screencast_enabled_ = false; |
| 330 return Response::FallThrough(); | 330 return Response::FallThrough(); |
| 331 } | 331 } |
| 332 | 332 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 | 579 |
| 580 void PageHandler::OnColorPicked(int r, int g, int b, int a) { | 580 void PageHandler::OnColorPicked(int r, int g, int b, int a) { |
| 581 scoped_refptr<dom::RGBA> color = | 581 scoped_refptr<dom::RGBA> color = |
| 582 dom::RGBA::Create()->set_r(r)->set_g(g)->set_b(b)->set_a(a); | 582 dom::RGBA::Create()->set_r(r)->set_g(g)->set_b(b)->set_a(a); |
| 583 client_->ColorPicked(ColorPickedParams::Create()->set_color(color)); | 583 client_->ColorPicked(ColorPickedParams::Create()->set_color(color)); |
| 584 } | 584 } |
| 585 | 585 |
| 586 } // namespace page | 586 } // namespace page |
| 587 } // namespace devtools | 587 } // namespace devtools |
| 588 } // namespace content | 588 } // namespace content |
| OLD | NEW |