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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 PaintAtSizeAckDetails details = {tag, size}; | 828 PaintAtSizeAckDetails details = {tag, size}; |
829 gfx::Size size_details = size; | 829 gfx::Size size_details = size; |
830 NotificationService::current()->Notify( | 830 NotificationService::current()->Notify( |
831 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 831 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
832 Source<RenderWidgetHost>(this), | 832 Source<RenderWidgetHost>(this), |
833 Details<PaintAtSizeAckDetails>(&details)); | 833 Details<PaintAtSizeAckDetails>(&details)); |
834 } | 834 } |
835 | 835 |
836 void RenderWidgetHost::OnMsgUpdateRect( | 836 void RenderWidgetHost::OnMsgUpdateRect( |
837 const ViewHostMsg_UpdateRect_Params& params) { | 837 const ViewHostMsg_UpdateRect_Params& params) { |
838 GPU_TRACE_EVENT0("renderer_host", "RenderWidgetHost::OnMsgUpdateRect"); | 838 TRACE_EVENT0("renderer_host", "RenderWidgetHost::OnMsgUpdateRect"); |
839 TimeTicks paint_start = TimeTicks::Now(); | 839 TimeTicks paint_start = TimeTicks::Now(); |
840 | 840 |
841 NotificationService::current()->Notify( | 841 NotificationService::current()->Notify( |
842 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, | 842 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, |
843 Source<RenderWidgetHost>(this), | 843 Source<RenderWidgetHost>(this), |
844 NotificationService::NoDetails()); | 844 NotificationService::NoDetails()); |
845 | 845 |
846 // Update our knowledge of the RenderWidget's size. | 846 // Update our knowledge of the RenderWidget's size. |
847 current_size_ = params.view_size; | 847 current_size_ = params.view_size; |
848 // Update our knowledge of the RenderWidget's scroll offset. | 848 // Update our knowledge of the RenderWidget's scroll offset. |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1289 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1290 #endif | 1290 #endif |
1291 } | 1291 } |
1292 | 1292 |
1293 deferred_plugin_handles_.clear(); | 1293 deferred_plugin_handles_.clear(); |
1294 } | 1294 } |
1295 | 1295 |
1296 void RenderWidgetHost::StartUserGesture() { | 1296 void RenderWidgetHost::StartUserGesture() { |
1297 OnUserGesture(); | 1297 OnUserGesture(); |
1298 } | 1298 } |
OLD | NEW |