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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 1635513003: Implement webview.captureVisibleRegion() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Save bug number to surface_utils.cc. Created 4 years, 10 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/frame_host/render_widget_host_view_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 cc::SurfaceFactory::DrawCallback ack_callback = base::Bind( 295 cc::SurfaceFactory::DrawCallback ack_callback = base::Bind(
296 &RenderWidgetHostViewChildFrame::SurfaceDrawn, 296 &RenderWidgetHostViewChildFrame::SurfaceDrawn,
297 RenderWidgetHostViewChildFrame::AsWeakPtr(), output_surface_id); 297 RenderWidgetHostViewChildFrame::AsWeakPtr(), output_surface_id);
298 ack_pending_count_++; 298 ack_pending_count_++;
299 // If this value grows very large, something is going wrong. 299 // If this value grows very large, something is going wrong.
300 DCHECK(ack_pending_count_ < 1000); 300 DCHECK(ack_pending_count_ < 1000);
301 surface_factory_->SubmitCompositorFrame(surface_id_, std::move(frame), 301 surface_factory_->SubmitCompositorFrame(surface_id_, std::move(frame),
302 ack_callback); 302 ack_callback);
303
304 ProcessFrameSwappedCallbacks();
303 } 305 }
304 306
305 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { 307 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) {
306 if (!platform_view_) { 308 if (!platform_view_) {
307 // In theory, we can get here if there's a delay between DestroyGuestView() 309 // In theory, we can get here if there's a delay between DestroyGuestView()
308 // being called and when our destructor is invoked. 310 // being called and when our destructor is invoked.
309 return false; 311 return false;
310 } 312 }
311 313
312 return platform_view_->OnMessageReceived(msg); 314 return platform_view_->OnMessageReceived(msg);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate && 707 if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate &&
706 gesture_event.data.scrollUpdate.inertial) { 708 gesture_event.data.scrollUpdate.inertial) {
707 return; 709 return;
708 } 710 }
709 host_->ForwardGestureEvent(gesture_event); 711 host_->ForwardGestureEvent(gesture_event);
710 return; 712 return;
711 } 713 }
712 } 714 }
713 715
714 } // namespace content 716 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698