| 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 19 matching lines...) Expand all Loading... |
| 30 #include "base/trace_event/trace_event.h" | 30 #include "base/trace_event/trace_event.h" |
| 31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
| 32 #include "components/mime_util/mime_util.h" | 32 #include "components/mime_util/mime_util.h" |
| 33 #include "components/url_formatter/url_formatter.h" | 33 #include "components/url_formatter/url_formatter.h" |
| 34 #include "content/browser/accessibility/accessibility_mode_helper.h" | 34 #include "content/browser/accessibility/accessibility_mode_helper.h" |
| 35 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 35 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 36 #include "content/browser/bad_message.h" | 36 #include "content/browser/bad_message.h" |
| 37 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 37 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 38 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 38 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 39 #include "content/browser/child_process_security_policy_impl.h" | 39 #include "content/browser/child_process_security_policy_impl.h" |
| 40 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 40 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 41 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 41 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 42 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 42 #include "content/browser/download/download_stats.h" | 43 #include "content/browser/download/download_stats.h" |
| 43 #include "content/browser/download/mhtml_generation_manager.h" | 44 #include "content/browser/download/mhtml_generation_manager.h" |
| 44 #include "content/browser/download/save_package.h" | 45 #include "content/browser/download/save_package.h" |
| 45 #include "content/browser/find_request_manager.h" | 46 #include "content/browser/find_request_manager.h" |
| 46 #include "content/browser/frame_host/cross_process_frame_connector.h" | 47 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 47 #include "content/browser/frame_host/frame_tree_node.h" | 48 #include "content/browser/frame_host/frame_tree_node.h" |
| 48 #include "content/browser/frame_host/interstitial_page_impl.h" | 49 #include "content/browser/frame_host/interstitial_page_impl.h" |
| 49 #include "content/browser/frame_host/navigation_entry_impl.h" | 50 #include "content/browser/frame_host/navigation_entry_impl.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #include "content/common/input_messages.h" | 83 #include "content/common/input_messages.h" |
| 83 #include "content/common/page_messages.h" | 84 #include "content/common/page_messages.h" |
| 84 #include "content/common/page_state_serialization.h" | 85 #include "content/common/page_state_serialization.h" |
| 85 #include "content/common/render_message_filter.mojom.h" | 86 #include "content/common/render_message_filter.mojom.h" |
| 86 #include "content/common/site_isolation_policy.h" | 87 #include "content/common/site_isolation_policy.h" |
| 87 #include "content/common/view_messages.h" | 88 #include "content/common/view_messages.h" |
| 88 #include "content/public/browser/ax_event_notification_details.h" | 89 #include "content/public/browser/ax_event_notification_details.h" |
| 89 #include "content/public/browser/browser_context.h" | 90 #include "content/public/browser/browser_context.h" |
| 90 #include "content/public/browser/browser_plugin_guest_manager.h" | 91 #include "content/public/browser/browser_plugin_guest_manager.h" |
| 91 #include "content/public/browser/content_browser_client.h" | 92 #include "content/public/browser/content_browser_client.h" |
| 92 #include "content/public/browser/devtools_agent_host.h" | |
| 93 #include "content/public/browser/download_manager.h" | 93 #include "content/public/browser/download_manager.h" |
| 94 #include "content/public/browser/download_url_parameters.h" | 94 #include "content/public/browser/download_url_parameters.h" |
| 95 #include "content/public/browser/guest_mode.h" | 95 #include "content/public/browser/guest_mode.h" |
| 96 #include "content/public/browser/invalidate_type.h" | 96 #include "content/public/browser/invalidate_type.h" |
| 97 #include "content/public/browser/javascript_dialog_manager.h" | 97 #include "content/public/browser/javascript_dialog_manager.h" |
| 98 #include "content/public/browser/load_notification_details.h" | 98 #include "content/public/browser/load_notification_details.h" |
| 99 #include "content/public/browser/navigation_details.h" | 99 #include "content/public/browser/navigation_details.h" |
| 100 #include "content/public/browser/notification_details.h" | 100 #include "content/public/browser/notification_details.h" |
| 101 #include "content/public/browser/notification_service.h" | 101 #include "content/public/browser/notification_service.h" |
| 102 #include "content/public/browser/notification_types.h" | 102 #include "content/public/browser/notification_types.h" |
| (...skipping 4116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4219 | 4219 |
| 4220 NotificationService::current()->Notify( | 4220 NotificationService::current()->Notify( |
| 4221 NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, | 4221 NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, |
| 4222 Source<WebContents>(this), | 4222 Source<WebContents>(this), |
| 4223 Details<RenderViewHost>(render_view_host)); | 4223 Details<RenderViewHost>(render_view_host)); |
| 4224 | 4224 |
| 4225 view_->RenderViewCreated(render_view_host); | 4225 view_->RenderViewCreated(render_view_host); |
| 4226 | 4226 |
| 4227 FOR_EACH_OBSERVER( | 4227 FOR_EACH_OBSERVER( |
| 4228 WebContentsObserver, observers_, RenderViewCreated(render_view_host)); | 4228 WebContentsObserver, observers_, RenderViewCreated(render_view_host)); |
| 4229 RenderFrameDevToolsAgentHost::WebContentsCreated(this); |
| 4229 } | 4230 } |
| 4230 | 4231 |
| 4231 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { | 4232 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { |
| 4232 if (rvh != GetRenderViewHost()) { | 4233 if (rvh != GetRenderViewHost()) { |
| 4233 // Don't notify the world, since this came from a renderer in the | 4234 // Don't notify the world, since this came from a renderer in the |
| 4234 // background. | 4235 // background. |
| 4235 return; | 4236 return; |
| 4236 } | 4237 } |
| 4237 | 4238 |
| 4238 notify_disconnection_ = true; | 4239 notify_disconnection_ = true; |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5185 dialog_manager_ = dialog_manager; | 5186 dialog_manager_ = dialog_manager; |
| 5186 } | 5187 } |
| 5187 | 5188 |
| 5188 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5189 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5189 auto it = binding_sets_.find(interface_name); | 5190 auto it = binding_sets_.find(interface_name); |
| 5190 if (it != binding_sets_.end()) | 5191 if (it != binding_sets_.end()) |
| 5191 binding_sets_.erase(it); | 5192 binding_sets_.erase(it); |
| 5192 } | 5193 } |
| 5193 | 5194 |
| 5194 } // namespace content | 5195 } // namespace content |
| OLD | NEW |