OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer_host/render_widget_host.h" | 5 #include "content/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" |
9 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
11 #include "chrome/browser/accessibility/browser_accessibility_state.h" | 12 #include "chrome/browser/accessibility/browser_accessibility_state.h" |
12 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
13 #include "content/browser/gpu_process_host.h" | 14 #include "content/browser/gpu_process_host.h" |
14 #include "content/browser/renderer_host/backing_store.h" | 15 #include "content/browser/renderer_host/backing_store.h" |
15 #include "content/browser/renderer_host/backing_store_manager.h" | 16 #include "content/browser/renderer_host/backing_store_manager.h" |
16 #include "content/browser/renderer_host/render_process_host.h" | 17 #include "content/browser/renderer_host/render_process_host.h" |
17 #include "content/browser/renderer_host/render_widget_helper.h" | 18 #include "content/browser/renderer_host/render_widget_helper.h" |
18 #include "content/browser/renderer_host/render_widget_host_view.h" | 19 #include "content/browser/renderer_host/render_widget_host_view.h" |
19 #include "content/browser/user_metrics.h" | 20 #include "content/browser/user_metrics.h" |
20 #include "content/common/gpu/gpu_messages.h" | 21 #include "content/common/gpu/gpu_messages.h" |
21 #include "content/common/native_web_keyboard_event.h" | 22 #include "content/common/native_web_keyboard_event.h" |
22 #include "content/common/notification_service.h" | 23 #include "content/common/notification_service.h" |
23 #include "content/common/result_codes.h" | 24 #include "content/common/result_codes.h" |
24 #include "content/common/view_messages.h" | 25 #include "content/common/view_messages.h" |
25 #include "gpu/common/gpu_trace_event.h" | |
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
27 #include "ui/base/keycodes/keyboard_codes.h" | 27 #include "ui/base/keycodes/keyboard_codes.h" |
28 #include "webkit/glue/webcursor.h" | 28 #include "webkit/glue/webcursor.h" |
29 #include "webkit/plugins/npapi/webplugin.h" | 29 #include "webkit/plugins/npapi/webplugin.h" |
30 | 30 |
31 #if defined(TOOLKIT_VIEWS) | 31 #if defined(TOOLKIT_VIEWS) |
32 #include "views/view.h" | 32 #include "views/view.h" |
33 #endif | 33 #endif |
34 | 34 |
35 #if defined (OS_MACOSX) | 35 #if defined (OS_MACOSX) |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 PaintAtSizeAckDetails details = {tag, size}; | 830 PaintAtSizeAckDetails details = {tag, size}; |
831 gfx::Size size_details = size; | 831 gfx::Size size_details = size; |
832 NotificationService::current()->Notify( | 832 NotificationService::current()->Notify( |
833 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 833 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
834 Source<RenderWidgetHost>(this), | 834 Source<RenderWidgetHost>(this), |
835 Details<PaintAtSizeAckDetails>(&details)); | 835 Details<PaintAtSizeAckDetails>(&details)); |
836 } | 836 } |
837 | 837 |
838 void RenderWidgetHost::OnMsgUpdateRect( | 838 void RenderWidgetHost::OnMsgUpdateRect( |
839 const ViewHostMsg_UpdateRect_Params& params) { | 839 const ViewHostMsg_UpdateRect_Params& params) { |
840 GPU_TRACE_EVENT0("renderer_host", "RenderWidgetHost::OnMsgUpdateRect"); | 840 TRACE_EVENT0("renderer_host", "RenderWidgetHost::OnMsgUpdateRect"); |
841 TimeTicks paint_start = TimeTicks::Now(); | 841 TimeTicks paint_start = TimeTicks::Now(); |
842 | 842 |
843 NotificationService::current()->Notify( | 843 NotificationService::current()->Notify( |
844 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, | 844 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, |
845 Source<RenderWidgetHost>(this), | 845 Source<RenderWidgetHost>(this), |
846 NotificationService::NoDetails()); | 846 NotificationService::NoDetails()); |
847 | 847 |
848 // Update our knowledge of the RenderWidget's size. | 848 // Update our knowledge of the RenderWidget's size. |
849 current_size_ = params.view_size; | 849 current_size_ = params.view_size; |
850 // Update our knowledge of the RenderWidget's scroll offset. | 850 // Update our knowledge of the RenderWidget's scroll offset. |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1296 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1297 #endif | 1297 #endif |
1298 } | 1298 } |
1299 | 1299 |
1300 deferred_plugin_handles_.clear(); | 1300 deferred_plugin_handles_.clear(); |
1301 } | 1301 } |
1302 | 1302 |
1303 void RenderWidgetHost::StartUserGesture() { | 1303 void RenderWidgetHost::StartUserGesture() { |
1304 OnUserGesture(); | 1304 OnUserGesture(); |
1305 } | 1305 } |
OLD | NEW |