| OLD | NEW |
| 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/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "content/renderer/gpu/render_widget_compositor.h" | 42 #include "content/renderer/gpu/render_widget_compositor.h" |
| 43 #include "content/renderer/ime_event_guard.h" | 43 #include "content/renderer/ime_event_guard.h" |
| 44 #include "content/renderer/input/input_handler_manager.h" | 44 #include "content/renderer/input/input_handler_manager.h" |
| 45 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 45 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 46 #include "content/renderer/render_frame_impl.h" | 46 #include "content/renderer/render_frame_impl.h" |
| 47 #include "content/renderer/render_frame_proxy.h" | 47 #include "content/renderer/render_frame_proxy.h" |
| 48 #include "content/renderer/render_process.h" | 48 #include "content/renderer/render_process.h" |
| 49 #include "content/renderer/render_thread_impl.h" | 49 #include "content/renderer/render_thread_impl.h" |
| 50 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 50 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 51 #include "content/renderer/resizing_mode_selector.h" | 51 #include "content/renderer/resizing_mode_selector.h" |
| 52 #include "content/renderer/v8_heap_statistics_monitor.h" |
| 52 #include "ipc/ipc_sync_message.h" | 53 #include "ipc/ipc_sync_message.h" |
| 53 #include "skia/ext/platform_canvas.h" | 54 #include "skia/ext/platform_canvas.h" |
| 54 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 55 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| 55 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 56 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 56 #include "third_party/WebKit/public/platform/WebRect.h" | 57 #include "third_party/WebKit/public/platform/WebRect.h" |
| 57 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 58 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| 58 #include "third_party/WebKit/public/platform/WebSize.h" | 59 #include "third_party/WebKit/public/platform/WebSize.h" |
| 59 #include "third_party/WebKit/public/platform/WebString.h" | 60 #include "third_party/WebKit/public/platform/WebString.h" |
| 60 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 61 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
| 61 #include "third_party/WebKit/public/web/WebPagePopup.h" | 62 #include "third_party/WebKit/public/web/WebPagePopup.h" |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 } | 1202 } |
| 1202 | 1203 |
| 1203 void RenderWidget::didBecomeReadyForAdditionalInput() { | 1204 void RenderWidget::didBecomeReadyForAdditionalInput() { |
| 1204 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); | 1205 TRACE_EVENT0("renderer", "RenderWidget::didBecomeReadyForAdditionalInput"); |
| 1205 FlushPendingInputEventAck(); | 1206 FlushPendingInputEventAck(); |
| 1206 } | 1207 } |
| 1207 | 1208 |
| 1208 void RenderWidget::DidCommitCompositorFrame() { | 1209 void RenderWidget::DidCommitCompositorFrame() { |
| 1209 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, | 1210 FOR_EACH_OBSERVER(RenderFrameProxy, render_frame_proxies_, |
| 1210 DidCommitCompositorFrame()); | 1211 DidCommitCompositorFrame()); |
| 1212 |
| 1213 V8HeapStatisticsMonitor* monitor = |
| 1214 RenderThreadImpl::current()->v8_heap_statistics_monitor(); |
| 1215 if (monitor->IsMonitoring()) |
| 1216 monitor->BeginAnotherDump(); |
| 1217 |
| 1211 #if defined(VIDEO_HOLE) | 1218 #if defined(VIDEO_HOLE) |
| 1212 FOR_EACH_OBSERVER(RenderFrameImpl, video_hole_frames_, | 1219 FOR_EACH_OBSERVER(RenderFrameImpl, video_hole_frames_, |
| 1213 DidCommitCompositorFrame()); | 1220 DidCommitCompositorFrame()); |
| 1214 #endif // defined(VIDEO_HOLE) | 1221 #endif // defined(VIDEO_HOLE) |
| 1215 } | 1222 } |
| 1216 | 1223 |
| 1217 void RenderWidget::didCommitAndDrawCompositorFrame() { | 1224 void RenderWidget::didCommitAndDrawCompositorFrame() { |
| 1218 // NOTE: Tests may break if this event is renamed or moved. See | 1225 // NOTE: Tests may break if this event is renamed or moved. See |
| 1219 // tab_capture_performancetest.cc. | 1226 // tab_capture_performancetest.cc. |
| 1220 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); | 1227 TRACE_EVENT0("gpu", "RenderWidget::didCommitAndDrawCompositorFrame"); |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2080 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2074 video_hole_frames_.AddObserver(frame); | 2081 video_hole_frames_.AddObserver(frame); |
| 2075 } | 2082 } |
| 2076 | 2083 |
| 2077 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2084 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
| 2078 video_hole_frames_.RemoveObserver(frame); | 2085 video_hole_frames_.RemoveObserver(frame); |
| 2079 } | 2086 } |
| 2080 #endif // defined(VIDEO_HOLE) | 2087 #endif // defined(VIDEO_HOLE) |
| 2081 | 2088 |
| 2082 } // namespace content | 2089 } // namespace content |
| OLD | NEW |