| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "content/browser/media/session/media_session_impl.h" | 64 #include "content/browser/media/session/media_session_impl.h" |
| 65 #include "content/browser/message_port_message_filter.h" | 65 #include "content/browser/message_port_message_filter.h" |
| 66 #include "content/browser/plugin_content_origin_whitelist.h" | 66 #include "content/browser/plugin_content_origin_whitelist.h" |
| 67 #include "content/browser/renderer_host/render_process_host_impl.h" | 67 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 68 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 68 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 69 #include "content/browser/renderer_host/render_view_host_impl.h" | 69 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 70 #include "content/browser/renderer_host/render_widget_host_impl.h" | 70 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 71 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 71 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
| 72 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 72 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 73 #include "content/browser/renderer_host/text_input_manager.h" | 73 #include "content/browser/renderer_host/text_input_manager.h" |
| 74 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_
impl.h" | 74 #include "content/browser/screen_orientation/screen_orientation.h" |
| 75 #include "content/browser/site_instance_impl.h" | 75 #include "content/browser/site_instance_impl.h" |
| 76 #include "content/browser/web_contents/web_contents_view_child_frame.h" | 76 #include "content/browser/web_contents/web_contents_view_child_frame.h" |
| 77 #include "content/browser/web_contents/web_contents_view_guest.h" | 77 #include "content/browser/web_contents/web_contents_view_guest.h" |
| 78 #include "content/browser/webui/generic_handler.h" | 78 #include "content/browser/webui/generic_handler.h" |
| 79 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 79 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 80 #include "content/browser/webui/web_ui_impl.h" | 80 #include "content/browser/webui/web_ui_impl.h" |
| 81 #include "content/common/browser_plugin/browser_plugin_constants.h" | 81 #include "content/common/browser_plugin/browser_plugin_constants.h" |
| 82 #include "content/common/browser_plugin/browser_plugin_messages.h" | 82 #include "content/common/browser_plugin/browser_plugin_messages.h" |
| 83 #include "content/common/drag_messages.h" | 83 #include "content/common/drag_messages.h" |
| 84 #include "content/common/frame_messages.h" | 84 #include "content/common/frame_messages.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 97 #include "content/public/browser/guest_mode.h" | 97 #include "content/public/browser/guest_mode.h" |
| 98 #include "content/public/browser/invalidate_type.h" | 98 #include "content/public/browser/invalidate_type.h" |
| 99 #include "content/public/browser/javascript_dialog_manager.h" | 99 #include "content/public/browser/javascript_dialog_manager.h" |
| 100 #include "content/public/browser/load_notification_details.h" | 100 #include "content/public/browser/load_notification_details.h" |
| 101 #include "content/public/browser/navigation_details.h" | 101 #include "content/public/browser/navigation_details.h" |
| 102 #include "content/public/browser/notification_details.h" | 102 #include "content/public/browser/notification_details.h" |
| 103 #include "content/public/browser/notification_service.h" | 103 #include "content/public/browser/notification_service.h" |
| 104 #include "content/public/browser/notification_types.h" | 104 #include "content/public/browser/notification_types.h" |
| 105 #include "content/public/browser/render_widget_host_iterator.h" | 105 #include "content/public/browser/render_widget_host_iterator.h" |
| 106 #include "content/public/browser/resource_request_details.h" | 106 #include "content/public/browser/resource_request_details.h" |
| 107 #include "content/public/browser/screen_orientation_dispatcher_host.h" | 107 #include "content/public/browser/screen_orientation_provider.h" |
| 108 #include "content/public/browser/security_style_explanations.h" | 108 #include "content/public/browser/security_style_explanations.h" |
| 109 #include "content/public/browser/storage_partition.h" | 109 #include "content/public/browser/storage_partition.h" |
| 110 #include "content/public/browser/user_metrics.h" | 110 #include "content/public/browser/user_metrics.h" |
| 111 #include "content/public/browser/web_contents_binding_set.h" | 111 #include "content/public/browser/web_contents_binding_set.h" |
| 112 #include "content/public/browser/web_contents_delegate.h" | 112 #include "content/public/browser/web_contents_delegate.h" |
| 113 #include "content/public/browser/web_contents_unresponsive_state.h" | 113 #include "content/public/browser/web_contents_unresponsive_state.h" |
| 114 #include "content/public/common/bindings_policy.h" | 114 #include "content/public/common/bindings_policy.h" |
| 115 #include "content/public/common/browser_side_navigation_policy.h" | 115 #include "content/public/common/browser_side_navigation_policy.h" |
| 116 #include "content/public/common/child_process_host.h" | 116 #include "content/public/common/child_process_host.h" |
| 117 #include "content/public/common/content_constants.h" | 117 #include "content/public/common/content_constants.h" |
| (...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 | 1611 |
| 1612 #if BUILDFLAG(ENABLE_PLUGINS) | 1612 #if BUILDFLAG(ENABLE_PLUGINS) |
| 1613 plugin_content_origin_whitelist_.reset( | 1613 plugin_content_origin_whitelist_.reset( |
| 1614 new PluginContentOriginWhitelist(this)); | 1614 new PluginContentOriginWhitelist(this)); |
| 1615 #endif | 1615 #endif |
| 1616 | 1616 |
| 1617 registrar_.Add(this, | 1617 registrar_.Add(this, |
| 1618 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, | 1618 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, |
| 1619 NotificationService::AllBrowserContextsAndSources()); | 1619 NotificationService::AllBrowserContextsAndSources()); |
| 1620 | 1620 |
| 1621 screen_orientation_dispatcher_host_.reset( | 1621 screen_orientation_.reset(new ScreenOrientation(this)); |
| 1622 new ScreenOrientationDispatcherHostImpl(this)); | |
| 1623 | 1622 |
| 1624 manifest_manager_host_.reset(new ManifestManagerHost(this)); | 1623 manifest_manager_host_.reset(new ManifestManagerHost(this)); |
| 1625 | 1624 |
| 1626 #if defined(OS_ANDROID) | 1625 #if defined(OS_ANDROID) |
| 1627 date_time_chooser_.reset(new DateTimeChooserAndroid()); | 1626 date_time_chooser_.reset(new DateTimeChooserAndroid()); |
| 1628 #endif | 1627 #endif |
| 1629 | 1628 |
| 1630 // BrowserPluginGuest::Init needs to be called after this WebContents has | 1629 // BrowserPluginGuest::Init needs to be called after this WebContents has |
| 1631 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above. | 1630 // a RenderWidgetHostViewGuest. That is, |view_->CreateView| above. |
| 1632 if (browser_plugin_guest_) | 1631 if (browser_plugin_guest_) |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2437 | 2436 |
| 2438 device::GeolocationServiceContext* | 2437 device::GeolocationServiceContext* |
| 2439 WebContentsImpl::GetGeolocationServiceContext() { | 2438 WebContentsImpl::GetGeolocationServiceContext() { |
| 2440 return geolocation_service_context_.get(); | 2439 return geolocation_service_context_.get(); |
| 2441 } | 2440 } |
| 2442 | 2441 |
| 2443 device::WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { | 2442 device::WakeLockServiceContext* WebContentsImpl::GetWakeLockServiceContext() { |
| 2444 return wake_lock_service_context_.get(); | 2443 return wake_lock_service_context_.get(); |
| 2445 } | 2444 } |
| 2446 | 2445 |
| 2446 ScreenOrientationProvider* WebContentsImpl::GetScreenOrientationProvider() { |
| 2447 return screen_orientation_.get()->GetScreenOrientationProvider(); |
| 2448 } |
| 2449 |
| 2447 void WebContentsImpl::OnShowValidationMessage( | 2450 void WebContentsImpl::OnShowValidationMessage( |
| 2448 const gfx::Rect& anchor_in_root_view, | 2451 const gfx::Rect& anchor_in_root_view, |
| 2449 const base::string16& main_text, | 2452 const base::string16& main_text, |
| 2450 const base::string16& sub_text) { | 2453 const base::string16& sub_text) { |
| 2451 if (delegate_) | 2454 if (delegate_) |
| 2452 delegate_->ShowValidationMessage( | 2455 delegate_->ShowValidationMessage( |
| 2453 this, anchor_in_root_view, main_text, sub_text); | 2456 this, anchor_in_root_view, main_text, sub_text); |
| 2454 } | 2457 } |
| 2455 | 2458 |
| 2456 void WebContentsImpl::OnHideValidationMessage() { | 2459 void WebContentsImpl::OnHideValidationMessage() { |
| (...skipping 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5278 dialog_manager_ = dialog_manager; | 5281 dialog_manager_ = dialog_manager; |
| 5279 } | 5282 } |
| 5280 | 5283 |
| 5281 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5284 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5282 auto it = binding_sets_.find(interface_name); | 5285 auto it = binding_sets_.find(interface_name); |
| 5283 if (it != binding_sets_.end()) | 5286 if (it != binding_sets_.end()) |
| 5284 binding_sets_.erase(it); | 5287 binding_sets_.erase(it); |
| 5285 } | 5288 } |
| 5286 | 5289 |
| 5287 } // namespace content | 5290 } // namespace content |
| OLD | NEW |