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/browser/metrics/user_metrics.h" | 13 #include "chrome/browser/metrics/user_metrics.h" |
13 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/render_messages.h" | 15 #include "chrome/common/render_messages.h" |
15 #include "chrome/common/spellcheck_messages.h" | 16 #include "chrome/common/spellcheck_messages.h" |
16 #include "content/browser/renderer_host/backing_store.h" | 17 #include "content/browser/renderer_host/backing_store.h" |
17 #include "content/browser/renderer_host/backing_store_manager.h" | 18 #include "content/browser/renderer_host/backing_store_manager.h" |
18 #include "content/browser/renderer_host/render_process_host.h" | 19 #include "content/browser/renderer_host/render_process_host.h" |
19 #include "content/browser/renderer_host/render_widget_helper.h" | 20 #include "content/browser/renderer_host/render_widget_helper.h" |
20 #include "content/browser/renderer_host/render_widget_host_view.h" | 21 #include "content/browser/renderer_host/render_widget_host_view.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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 PaintAtSizeAckDetails details = {tag, size}; | 811 PaintAtSizeAckDetails details = {tag, size}; |
812 gfx::Size size_details = size; | 812 gfx::Size size_details = size; |
813 NotificationService::current()->Notify( | 813 NotificationService::current()->Notify( |
814 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, | 814 NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, |
815 Source<RenderWidgetHost>(this), | 815 Source<RenderWidgetHost>(this), |
816 Details<PaintAtSizeAckDetails>(&details)); | 816 Details<PaintAtSizeAckDetails>(&details)); |
817 } | 817 } |
818 | 818 |
819 void RenderWidgetHost::OnMsgUpdateRect( | 819 void RenderWidgetHost::OnMsgUpdateRect( |
820 const ViewHostMsg_UpdateRect_Params& params) { | 820 const ViewHostMsg_UpdateRect_Params& params) { |
821 GPU_TRACE_EVENT0("renderer_host", "RenderWidgetHost::OnMsgUpdateRect"); | 821 TRACE_EVENT0("renderer_host", "RenderWidgetHost::OnMsgUpdateRect"); |
822 TimeTicks paint_start = TimeTicks::Now(); | 822 TimeTicks paint_start = TimeTicks::Now(); |
823 | 823 |
824 NotificationService::current()->Notify( | 824 NotificationService::current()->Notify( |
825 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, | 825 NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, |
826 Source<RenderWidgetHost>(this), | 826 Source<RenderWidgetHost>(this), |
827 NotificationService::NoDetails()); | 827 NotificationService::NoDetails()); |
828 | 828 |
829 // Update our knowledge of the RenderWidget's size. | 829 // Update our knowledge of the RenderWidget's size. |
830 current_size_ = params.view_size; | 830 current_size_ = params.view_size; |
831 // Update our knowledge of the RenderWidget's scroll offset. | 831 // Update our knowledge of the RenderWidget's scroll offset. |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1280 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
1281 #endif | 1281 #endif |
1282 } | 1282 } |
1283 | 1283 |
1284 deferred_plugin_handles_.clear(); | 1284 deferred_plugin_handles_.clear(); |
1285 } | 1285 } |
1286 | 1286 |
1287 void RenderWidgetHost::StartUserGesture() { | 1287 void RenderWidgetHost::StartUserGesture() { |
1288 OnUserGesture(); | 1288 OnUserGesture(); |
1289 } | 1289 } |
OLD | NEW |