| 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/debug/trace_event.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "chrome/browser/accessibility/browser_accessibility_state.h" | |
| 15 #include "chrome/common/chrome_switches.h" | |
| 16 #include "content/browser/gpu/gpu_process_host.h" | 14 #include "content/browser/gpu/gpu_process_host.h" |
| 17 #include "content/browser/renderer_host/backing_store.h" | 15 #include "content/browser/renderer_host/backing_store.h" |
| 18 #include "content/browser/renderer_host/backing_store_manager.h" | 16 #include "content/browser/renderer_host/backing_store_manager.h" |
| 19 #include "content/browser/renderer_host/render_process_host.h" | 17 #include "content/browser/renderer_host/render_process_host.h" |
| 20 #include "content/browser/renderer_host/render_widget_helper.h" | 18 #include "content/browser/renderer_host/render_widget_helper.h" |
| 21 #include "content/browser/renderer_host/render_widget_host_view.h" | 19 #include "content/browser/renderer_host/render_widget_host_view.h" |
| 22 #include "content/browser/user_metrics.h" | 20 #include "content/browser/user_metrics.h" |
| 21 #include "content/common/content_switches.h" |
| 23 #include "content/common/gpu/gpu_messages.h" | 22 #include "content/common/gpu/gpu_messages.h" |
| 24 #include "content/common/native_web_keyboard_event.h" | 23 #include "content/common/native_web_keyboard_event.h" |
| 25 #include "content/common/notification_service.h" | 24 #include "content/common/notification_service.h" |
| 26 #include "content/common/result_codes.h" | 25 #include "content/common/result_codes.h" |
| 27 #include "content/common/view_messages.h" | 26 #include "content/common/view_messages.h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 29 #include "ui/base/keycodes/keyboard_codes.h" | 28 #include "ui/base/keycodes/keyboard_codes.h" |
| 30 #include "webkit/glue/webcursor.h" | 29 #include "webkit/glue/webcursor.h" |
| 31 #include "webkit/plugins/npapi/webplugin.h" | 30 #include "webkit/plugins/npapi/webplugin.h" |
| 32 | 31 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 suppress_next_char_events_(false) { | 87 suppress_next_char_events_(false) { |
| 89 if (routing_id_ == MSG_ROUTING_NONE) | 88 if (routing_id_ == MSG_ROUTING_NONE) |
| 90 routing_id_ = process_->GetNextRoutingID(); | 89 routing_id_ = process_->GetNextRoutingID(); |
| 91 | 90 |
| 92 process_->Attach(this, routing_id_); | 91 process_->Attach(this, routing_id_); |
| 93 // Because the widget initializes as is_hidden_ == false, | 92 // Because the widget initializes as is_hidden_ == false, |
| 94 // tell the process host that we're alive. | 93 // tell the process host that we're alive. |
| 95 process_->WidgetRestored(); | 94 process_->WidgetRestored(); |
| 96 | 95 |
| 97 if (CommandLine::ForCurrentProcess()->HasSwitch( | 96 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 98 switches::kForceRendererAccessibility) || | 97 switches::kForceRendererAccessibility)) { |
| 99 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { | |
| 100 EnableRendererAccessibility(); | 98 EnableRendererAccessibility(); |
| 101 } | 99 } |
| 102 } | 100 } |
| 103 | 101 |
| 104 RenderWidgetHost::~RenderWidgetHost() { | 102 RenderWidgetHost::~RenderWidgetHost() { |
| 105 // Clear our current or cached backing store if either remains. | 103 // Clear our current or cached backing store if either remains. |
| 106 BackingStoreManager::RemoveBackingStore(this); | 104 BackingStoreManager::RemoveBackingStore(this); |
| 107 | 105 |
| 108 process_->Release(routing_id_); | 106 process_->Release(routing_id_); |
| 109 } | 107 } |
| (...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 view_->CreatePluginContainer(deferred_plugin_handles_[i]); | 1197 view_->CreatePluginContainer(deferred_plugin_handles_[i]); |
| 1200 #endif | 1198 #endif |
| 1201 } | 1199 } |
| 1202 | 1200 |
| 1203 deferred_plugin_handles_.clear(); | 1201 deferred_plugin_handles_.clear(); |
| 1204 } | 1202 } |
| 1205 | 1203 |
| 1206 void RenderWidgetHost::StartUserGesture() { | 1204 void RenderWidgetHost::StartUserGesture() { |
| 1207 OnUserGesture(); | 1205 OnUserGesture(); |
| 1208 } | 1206 } |
| OLD | NEW |