Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Side by Side Diff: content/browser/devtools/protocol/page_handler.cc

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation again Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 frames_in_flight_ = 0; 312 frames_in_flight_ = 0;
313 capture_every_nth_frame_ = 313 capture_every_nth_frame_ =
314 every_nth_frame && *every_nth_frame ? *every_nth_frame : 1; 314 every_nth_frame && *every_nth_frame ? *every_nth_frame : 1;
315 315
316 bool visible = !widget_host->is_hidden(); 316 bool visible = !widget_host->is_hidden();
317 NotifyScreencastVisibility(visible); 317 NotifyScreencastVisibility(visible);
318 if (visible) { 318 if (visible) {
319 if (has_compositor_frame_metadata_) { 319 if (has_compositor_frame_metadata_) {
320 InnerSwapCompositorFrame(); 320 InnerSwapCompositorFrame();
321 } else { 321 } else {
322 widget_host->Send( 322 widget_host->Send(new ViewMsg_ForceRedraw(widget_host->GetRoutingID(),
323 new ViewMsg_ForceRedraw(widget_host->GetRoutingID(), 0)); 323 ui::LatencyInfo()));
324 } 324 }
325 } 325 }
326 return Response::FallThrough(); 326 return Response::FallThrough();
327 } 327 }
328 328
329 Response PageHandler::StopScreencast() { 329 Response PageHandler::StopScreencast() {
330 screencast_enabled_ = false; 330 screencast_enabled_ = false;
331 return Response::FallThrough(); 331 return Response::FallThrough();
332 } 332 }
333 333
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 580
581 void PageHandler::OnColorPicked(int r, int g, int b, int a) { 581 void PageHandler::OnColorPicked(int r, int g, int b, int a) {
582 scoped_refptr<dom::RGBA> color = 582 scoped_refptr<dom::RGBA> color =
583 dom::RGBA::Create()->set_r(r)->set_g(g)->set_b(b)->set_a(a); 583 dom::RGBA::Create()->set_r(r)->set_g(g)->set_b(b)->set_a(a);
584 client_->ColorPicked(ColorPickedParams::Create()->set_color(color)); 584 client_->ColorPicked(ColorPickedParams::Create()->set_color(color));
585 } 585 }
586 586
587 } // namespace page 587 } // namespace page
588 } // namespace devtools 588 } // namespace devtools
589 } // namespace content 589 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698