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 29 matching lines...) Expand all Loading... |
40 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 40 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
41 #include "content/browser/media/midi_dispatcher_host.h" | 41 #include "content/browser/media/midi_dispatcher_host.h" |
42 #include "content/browser/message_port_message_filter.h" | 42 #include "content/browser/message_port_message_filter.h" |
43 #include "content/browser/message_port_service.h" | 43 #include "content/browser/message_port_service.h" |
44 #include "content/browser/power_save_blocker_impl.h" | 44 #include "content/browser/power_save_blocker_impl.h" |
45 #include "content/browser/renderer_host/render_process_host_impl.h" | 45 #include "content/browser/renderer_host/render_process_host_impl.h" |
46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 46 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
47 #include "content/browser/renderer_host/render_view_host_impl.h" | 47 #include "content/browser/renderer_host/render_view_host_impl.h" |
48 #include "content/browser/renderer_host/render_widget_host_impl.h" | 48 #include "content/browser/renderer_host/render_widget_host_impl.h" |
49 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 49 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
50 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host.
h" | 50 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" |
51 #include "content/browser/site_instance_impl.h" | 51 #include "content/browser/site_instance_impl.h" |
52 #include "content/browser/web_contents/web_contents_view_guest.h" | 52 #include "content/browser/web_contents/web_contents_view_guest.h" |
53 #include "content/browser/webui/generic_handler.h" | 53 #include "content/browser/webui/generic_handler.h" |
54 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 54 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
55 #include "content/browser/webui/web_ui_impl.h" | 55 #include "content/browser/webui/web_ui_impl.h" |
56 #include "content/common/browser_plugin/browser_plugin_constants.h" | 56 #include "content/common/browser_plugin/browser_plugin_constants.h" |
57 #include "content/common/browser_plugin/browser_plugin_messages.h" | 57 #include "content/common/browser_plugin/browser_plugin_messages.h" |
58 #include "content/common/frame_messages.h" | 58 #include "content/common/frame_messages.h" |
59 #include "content/common/image_messages.h" | 59 #include "content/common/image_messages.h" |
60 #include "content/common/input_messages.h" | 60 #include "content/common/input_messages.h" |
61 #include "content/common/ssl_status_serialization.h" | 61 #include "content/common/ssl_status_serialization.h" |
62 #include "content/common/view_messages.h" | 62 #include "content/common/view_messages.h" |
63 #include "content/public/browser/ax_event_notification_details.h" | 63 #include "content/public/browser/ax_event_notification_details.h" |
64 #include "content/public/browser/browser_context.h" | 64 #include "content/public/browser/browser_context.h" |
65 #include "content/public/browser/browser_plugin_guest_manager.h" | 65 #include "content/public/browser/browser_plugin_guest_manager.h" |
66 #include "content/public/browser/content_browser_client.h" | 66 #include "content/public/browser/content_browser_client.h" |
67 #include "content/public/browser/devtools_agent_host.h" | 67 #include "content/public/browser/devtools_agent_host.h" |
68 #include "content/public/browser/download_manager.h" | 68 #include "content/public/browser/download_manager.h" |
69 #include "content/public/browser/download_url_parameters.h" | 69 #include "content/public/browser/download_url_parameters.h" |
70 #include "content/public/browser/invalidate_type.h" | 70 #include "content/public/browser/invalidate_type.h" |
71 #include "content/public/browser/javascript_dialog_manager.h" | 71 #include "content/public/browser/javascript_dialog_manager.h" |
72 #include "content/public/browser/load_from_memory_cache_details.h" | 72 #include "content/public/browser/load_from_memory_cache_details.h" |
73 #include "content/public/browser/load_notification_details.h" | 73 #include "content/public/browser/load_notification_details.h" |
74 #include "content/public/browser/navigation_details.h" | 74 #include "content/public/browser/navigation_details.h" |
75 #include "content/public/browser/notification_details.h" | 75 #include "content/public/browser/notification_details.h" |
76 #include "content/public/browser/notification_service.h" | 76 #include "content/public/browser/notification_service.h" |
77 #include "content/public/browser/render_widget_host_iterator.h" | 77 #include "content/public/browser/render_widget_host_iterator.h" |
78 #include "content/public/browser/resource_request_details.h" | 78 #include "content/public/browser/resource_request_details.h" |
| 79 #include "content/public/browser/screen_orientation_dispatcher_host.h" |
79 #include "content/public/browser/storage_partition.h" | 80 #include "content/public/browser/storage_partition.h" |
80 #include "content/public/browser/user_metrics.h" | 81 #include "content/public/browser/user_metrics.h" |
81 #include "content/public/browser/web_contents_delegate.h" | 82 #include "content/public/browser/web_contents_delegate.h" |
82 #include "content/public/browser/web_contents_observer.h" | 83 #include "content/public/browser/web_contents_observer.h" |
83 #include "content/public/common/bindings_policy.h" | 84 #include "content/public/common/bindings_policy.h" |
84 #include "content/public/common/content_constants.h" | 85 #include "content/public/common/content_constants.h" |
85 #include "content/public/common/content_switches.h" | 86 #include "content/public/common/content_switches.h" |
86 #include "content/public/common/page_zoom.h" | 87 #include "content/public/common/page_zoom.h" |
87 #include "content/public/common/result_codes.h" | 88 #include "content/public/common/result_codes.h" |
88 #include "content/public/common/url_constants.h" | 89 #include "content/public/common/url_constants.h" |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 AddDestructionObserver(opener_); | 1176 AddDestructionObserver(opener_); |
1176 | 1177 |
1177 registrar_.Add(this, | 1178 registrar_.Add(this, |
1178 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1179 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
1179 NotificationService::AllBrowserContextsAndSources()); | 1180 NotificationService::AllBrowserContextsAndSources()); |
1180 | 1181 |
1181 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); | 1182 geolocation_dispatcher_host_.reset(new GeolocationDispatcherHost(this)); |
1182 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); | 1183 midi_dispatcher_host_.reset(new MidiDispatcherHost(this)); |
1183 | 1184 |
1184 screen_orientation_dispatcher_host_.reset( | 1185 screen_orientation_dispatcher_host_.reset( |
1185 new ScreenOrientationDispatcherHost(this)); | 1186 new ScreenOrientationDispatcherHostImpl(this)); |
1186 | 1187 |
1187 #if defined(OS_ANDROID) | 1188 #if defined(OS_ANDROID) |
1188 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1189 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
1189 #endif | 1190 #endif |
1190 } | 1191 } |
1191 | 1192 |
1192 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { | 1193 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { |
1193 RemoveDestructionObserver(web_contents); | 1194 RemoveDestructionObserver(web_contents); |
1194 | 1195 |
1195 // Clear the opener if it has been closed. | 1196 // Clear the opener if it has been closed. |
(...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4244 node->render_manager()->ResumeResponseDeferredAtStart(); | 4245 node->render_manager()->ResumeResponseDeferredAtStart(); |
4245 } | 4246 } |
4246 | 4247 |
4247 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4248 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4248 force_disable_overscroll_content_ = force_disable; | 4249 force_disable_overscroll_content_ = force_disable; |
4249 if (view_) | 4250 if (view_) |
4250 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4251 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4251 } | 4252 } |
4252 | 4253 |
4253 } // namespace content | 4254 } // namespace content |
OLD | NEW |