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 4106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4209 | 4209 |
4210 NotificationService::current()->Notify( | 4210 NotificationService::current()->Notify( |
4211 NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, | 4211 NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, |
4212 Source<WebContents>(this), | 4212 Source<WebContents>(this), |
4213 Details<RenderViewHost>(render_view_host)); | 4213 Details<RenderViewHost>(render_view_host)); |
4214 | 4214 |
4215 view_->RenderViewCreated(render_view_host); | 4215 view_->RenderViewCreated(render_view_host); |
4216 | 4216 |
4217 for (auto& observer : observers_) | 4217 for (auto& observer : observers_) |
4218 observer.RenderViewCreated(render_view_host); | 4218 observer.RenderViewCreated(render_view_host); |
| 4219 RenderFrameDevToolsAgentHost::WebContentsCreated(this); |
4219 } | 4220 } |
4220 | 4221 |
4221 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { | 4222 void WebContentsImpl::RenderViewReady(RenderViewHost* rvh) { |
4222 if (rvh != GetRenderViewHost()) { | 4223 if (rvh != GetRenderViewHost()) { |
4223 // Don't notify the world, since this came from a renderer in the | 4224 // Don't notify the world, since this came from a renderer in the |
4224 // background. | 4225 // background. |
4225 return; | 4226 return; |
4226 } | 4227 } |
4227 | 4228 |
4228 notify_disconnection_ = true; | 4229 notify_disconnection_ = true; |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5187 dialog_manager_ = dialog_manager; | 5188 dialog_manager_ = dialog_manager; |
5188 } | 5189 } |
5189 | 5190 |
5190 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5191 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
5191 auto it = binding_sets_.find(interface_name); | 5192 auto it = binding_sets_.find(interface_name); |
5192 if (it != binding_sets_.end()) | 5193 if (it != binding_sets_.end()) |
5193 binding_sets_.erase(it); | 5194 binding_sets_.erase(it); |
5194 } | 5195 } |
5195 | 5196 |
5196 } // namespace content | 5197 } // namespace content |
OLD | NEW |