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

Side by Side Diff: content/renderer/render_widget.cc

Issue 83483007: Expose synthetic delays through the GPU benchmarking extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forward delays in RenderWidgetHostImpl properly. Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) 595 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
596 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) 596 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
597 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 597 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
598 #if defined(OS_ANDROID) 598 #if defined(OS_ANDROID)
599 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) 599 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded)
600 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck) 600 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck)
601 #endif 601 #endif
602 IPC_MESSAGE_HANDLER(ViewMsg_Snapshot, OnSnapshot) 602 IPC_MESSAGE_HANDLER(ViewMsg_Snapshot, OnSnapshot)
603 IPC_MESSAGE_HANDLER(ViewMsg_SetBrowserRenderingStats, 603 IPC_MESSAGE_HANDLER(ViewMsg_SetBrowserRenderingStats,
604 OnSetBrowserRenderingStats) 604 OnSetBrowserRenderingStats)
605 IPC_MESSAGE_HANDLER(ViewMsg_ConfigureSyntheticDelaysAck,
606 OnConfigureSyntheticDelaysAck)
605 IPC_MESSAGE_UNHANDLED(handled = false) 607 IPC_MESSAGE_UNHANDLED(handled = false)
606 IPC_END_MESSAGE_MAP() 608 IPC_END_MESSAGE_MAP()
607 return handled; 609 return handled;
608 } 610 }
609 611
610 bool RenderWidget::Send(IPC::Message* message) { 612 bool RenderWidget::Send(IPC::Message* message) {
611 // Don't send any messages after the browser has told us to close, and filter 613 // Don't send any messages after the browser has told us to close, and filter
612 // most outgoing messages while swapped out. 614 // most outgoing messages while swapped out.
613 if ((is_swapped_out_ && 615 if ((is_swapped_out_ &&
614 !SwappedOutMessages::CanSendWhileSwappedOut(message)) || 616 !SwappedOutMessages::CanSendWhileSwappedOut(message)) ||
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 2733
2732 void RenderWidget::OnSetBrowserRenderingStats( 2734 void RenderWidget::OnSetBrowserRenderingStats(
2733 const BrowserRenderingStats& stats) { 2735 const BrowserRenderingStats& stats) {
2734 browser_rendering_stats_ = stats; 2736 browser_rendering_stats_ = stats;
2735 } 2737 }
2736 2738
2737 void RenderWidget::GetBrowserRenderingStats(BrowserRenderingStats* stats) { 2739 void RenderWidget::GetBrowserRenderingStats(BrowserRenderingStats* stats) {
2738 *stats = browser_rendering_stats_; 2740 *stats = browser_rendering_stats_;
2739 } 2741 }
2740 2742
2743 void RenderWidget::ConfigureSyntheticDelays(
2744 const std::vector<content::SyntheticDelayConfiguration>& delays,
2745 const SyntheticDelayConfigurationCallback& callback) {
2746 DCHECK(!callback.is_null());
2747 Send(new ViewHostMsg_ConfigureSyntheticDelays(routing_id_, delays));
2748 pending_delay_configuration_ = callback;
2749 }
2750
2751 void RenderWidget::OnConfigureSyntheticDelaysAck() {
2752 pending_delay_configuration_.Run();
2753 }
2754
2741 bool RenderWidget::WillHandleMouseEvent(const blink::WebMouseEvent& event) { 2755 bool RenderWidget::WillHandleMouseEvent(const blink::WebMouseEvent& event) {
2742 return false; 2756 return false;
2743 } 2757 }
2744 2758
2745 bool RenderWidget::WillHandleKeyEvent(const blink::WebKeyboardEvent& event) { 2759 bool RenderWidget::WillHandleKeyEvent(const blink::WebKeyboardEvent& event) {
2746 return false; 2760 return false;
2747 } 2761 }
2748 2762
2749 bool RenderWidget::WillHandleGestureEvent( 2763 bool RenderWidget::WillHandleGestureEvent(
2750 const blink::WebGestureEvent& event) { 2764 const blink::WebGestureEvent& event) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 GetURLForGraphicsContext3D(), 2828 GetURLForGraphicsContext3D(),
2815 gpu_channel_host.get(), 2829 gpu_channel_host.get(),
2816 use_echo_for_swap_ack, 2830 use_echo_for_swap_ack,
2817 attributes, 2831 attributes,
2818 false /* bind generates resources */, 2832 false /* bind generates resources */,
2819 limits)); 2833 limits));
2820 return context.Pass(); 2834 return context.Pass();
2821 } 2835 }
2822 2836
2823 } // namespace content 2837 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698