| 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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 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 30 matching lines...) Expand all Loading... |
| 41 #include "content/browser/media/audio_stream_monitor.h" | 41 #include "content/browser/media/audio_stream_monitor.h" |
| 42 #include "content/browser/media/midi_dispatcher_host.h" | 42 #include "content/browser/media/midi_dispatcher_host.h" |
| 43 #include "content/browser/message_port_message_filter.h" | 43 #include "content/browser/message_port_message_filter.h" |
| 44 #include "content/browser/message_port_service.h" | 44 #include "content/browser/message_port_service.h" |
| 45 #include "content/browser/power_save_blocker_impl.h" | 45 #include "content/browser/power_save_blocker_impl.h" |
| 46 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 47 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 48 #include "content/browser/renderer_host/render_view_host_impl.h" | 48 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 49 #include "content/browser/renderer_host/render_widget_host_impl.h" | 49 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 50 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 50 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 51 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" | 51 #include "content/browser/screen_orientation/screen_orientation_context.h" |
| 52 #include "content/browser/site_instance_impl.h" | 52 #include "content/browser/site_instance_impl.h" |
| 53 #include "content/browser/web_contents/web_contents_view_guest.h" | 53 #include "content/browser/web_contents/web_contents_view_guest.h" |
| 54 #include "content/browser/webui/generic_handler.h" | 54 #include "content/browser/webui/generic_handler.h" |
| 55 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 55 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 56 #include "content/browser/webui/web_ui_impl.h" | 56 #include "content/browser/webui/web_ui_impl.h" |
| 57 #include "content/common/browser_plugin/browser_plugin_constants.h" | 57 #include "content/common/browser_plugin/browser_plugin_constants.h" |
| 58 #include "content/common/browser_plugin/browser_plugin_messages.h" | 58 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| 59 #include "content/common/frame_messages.h" | 59 #include "content/common/frame_messages.h" |
| 60 #include "content/common/image_messages.h" | 60 #include "content/common/image_messages.h" |
| 61 #include "content/common/input_messages.h" | 61 #include "content/common/input_messages.h" |
| 62 #include "content/common/ssl_status_serialization.h" | 62 #include "content/common/ssl_status_serialization.h" |
| 63 #include "content/common/view_messages.h" | 63 #include "content/common/view_messages.h" |
| 64 #include "content/public/browser/ax_event_notification_details.h" | 64 #include "content/public/browser/ax_event_notification_details.h" |
| 65 #include "content/public/browser/browser_context.h" | 65 #include "content/public/browser/browser_context.h" |
| 66 #include "content/public/browser/browser_plugin_guest_manager.h" | 66 #include "content/public/browser/browser_plugin_guest_manager.h" |
| 67 #include "content/public/browser/content_browser_client.h" | 67 #include "content/public/browser/content_browser_client.h" |
| 68 #include "content/public/browser/devtools_agent_host.h" | 68 #include "content/public/browser/devtools_agent_host.h" |
| 69 #include "content/public/browser/download_manager.h" | 69 #include "content/public/browser/download_manager.h" |
| 70 #include "content/public/browser/download_url_parameters.h" | 70 #include "content/public/browser/download_url_parameters.h" |
| 71 #include "content/public/browser/invalidate_type.h" | 71 #include "content/public/browser/invalidate_type.h" |
| 72 #include "content/public/browser/javascript_dialog_manager.h" | 72 #include "content/public/browser/javascript_dialog_manager.h" |
| 73 #include "content/public/browser/load_from_memory_cache_details.h" | 73 #include "content/public/browser/load_from_memory_cache_details.h" |
| 74 #include "content/public/browser/load_notification_details.h" | 74 #include "content/public/browser/load_notification_details.h" |
| 75 #include "content/public/browser/navigation_details.h" | 75 #include "content/public/browser/navigation_details.h" |
| 76 #include "content/public/browser/notification_details.h" | 76 #include "content/public/browser/notification_details.h" |
| 77 #include "content/public/browser/notification_service.h" | 77 #include "content/public/browser/notification_service.h" |
| 78 #include "content/public/browser/render_widget_host_iterator.h" | 78 #include "content/public/browser/render_widget_host_iterator.h" |
| 79 #include "content/public/browser/resource_request_details.h" | 79 #include "content/public/browser/resource_request_details.h" |
| 80 #include "content/public/browser/screen_orientation_dispatcher_host.h" | |
| 81 #include "content/public/browser/storage_partition.h" | 80 #include "content/public/browser/storage_partition.h" |
| 82 #include "content/public/browser/user_metrics.h" | 81 #include "content/public/browser/user_metrics.h" |
| 83 #include "content/public/browser/web_contents_delegate.h" | 82 #include "content/public/browser/web_contents_delegate.h" |
| 84 #include "content/public/browser/web_contents_observer.h" | 83 #include "content/public/browser/web_contents_observer.h" |
| 85 #include "content/public/common/bindings_policy.h" | 84 #include "content/public/common/bindings_policy.h" |
| 86 #include "content/public/common/content_constants.h" | 85 #include "content/public/common/content_constants.h" |
| 87 #include "content/public/common/content_switches.h" | 86 #include "content/public/common/content_switches.h" |
| 88 #include "content/public/common/page_zoom.h" | 87 #include "content/public/common/page_zoom.h" |
| 89 #include "content/public/common/result_codes.h" | 88 #include "content/public/common/result_codes.h" |
| 90 #include "content/public/common/url_constants.h" | 89 #include "content/public/common/url_constants.h" |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 if (opener_) | 1195 if (opener_) |
| 1197 AddDestructionObserver(opener_); | 1196 AddDestructionObserver(opener_); |
| 1198 | 1197 |
| 1199 registrar_.Add(this, | 1198 registrar_.Add(this, |
| 1200 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1199 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| 1201 NotificationService::AllBrowserContextsAndSources()); | 1200 NotificationService::AllBrowserContextsAndSources()); |
| 1202 | 1201 |
| 1203 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); | 1202 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
| 1204 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); | 1203 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); |
| 1205 | 1204 |
| 1206 screen_orientation_dispatcher_host_.reset( | 1205 screen_orientation_context_.reset(new ScreenOrientationContext()); |
| 1207 new ScreenOrientationDispatcherHostImpl(this)); | |
| 1208 | 1206 |
| 1209 #if defined(OS_ANDROID) | 1207 #if defined(OS_ANDROID) |
| 1210 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1208 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
| 1211 #endif | 1209 #endif |
| 1212 } | 1210 } |
| 1213 | 1211 |
| 1214 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1212 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
| 1215 RemoveDestructionObserver(web_contents); | 1213 RemoveDestructionObserver(web_contents); |
| 1216 | 1214 |
| 1217 // Clear the opener if it has been closed. | 1215 // Clear the opener if it has been closed. |
| (...skipping 3127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4345 node->render_manager()->ResumeResponseDeferredAtStart(); | 4343 node->render_manager()->ResumeResponseDeferredAtStart(); |
| 4346 } | 4344 } |
| 4347 | 4345 |
| 4348 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4346 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4349 force_disable_overscroll_content_ = force_disable; | 4347 force_disable_overscroll_content_ = force_disable; |
| 4350 if (view_) | 4348 if (view_) |
| 4351 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4349 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4352 } | 4350 } |
| 4353 | 4351 |
| 4354 } // namespace content | 4352 } // namespace content |
| OLD | NEW |