OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/frame_host/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.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/logging.h" | 10 #include "base/logging.h" |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 new FrameMsg_DidStartLoading(pair.second->GetRoutingID())); | 849 new FrameMsg_DidStartLoading(pair.second->GetRoutingID())); |
850 } | 850 } |
851 } | 851 } |
852 | 852 |
853 void RenderFrameHostManager::OnDidStopLoading() { | 853 void RenderFrameHostManager::OnDidStopLoading() { |
854 for (const auto& pair : proxy_hosts_) { | 854 for (const auto& pair : proxy_hosts_) { |
855 pair.second->Send(new FrameMsg_DidStopLoading(pair.second->GetRoutingID())); | 855 pair.second->Send(new FrameMsg_DidStopLoading(pair.second->GetRoutingID())); |
856 } | 856 } |
857 } | 857 } |
858 | 858 |
| 859 void RenderFrameHostManager::OnDidUpdateName(const std::string& name) { |
| 860 // The window.name message may be sent outside of --site-per-process when |
| 861 // report_frame_name_changes renderer preference is set (used by |
| 862 // WebView). Don't send the update to proxies in those cases. |
| 863 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 864 switches::kSitePerProcess)) |
| 865 return; |
| 866 |
| 867 for (const auto& pair : proxy_hosts_) { |
| 868 pair.second->Send( |
| 869 new FrameMsg_DidUpdateName(pair.second->GetRoutingID(), name)); |
| 870 } |
| 871 } |
| 872 |
859 void RenderFrameHostManager::Observe( | 873 void RenderFrameHostManager::Observe( |
860 int type, | 874 int type, |
861 const NotificationSource& source, | 875 const NotificationSource& source, |
862 const NotificationDetails& details) { | 876 const NotificationDetails& details) { |
863 switch (type) { | 877 switch (type) { |
864 case NOTIFICATION_RENDERER_PROCESS_CLOSED: | 878 case NOTIFICATION_RENDERER_PROCESS_CLOSED: |
865 case NOTIFICATION_RENDERER_PROCESS_CLOSING: | 879 case NOTIFICATION_RENDERER_PROCESS_CLOSING: |
866 RendererProcessClosing( | 880 RendererProcessClosing( |
867 Source<RenderProcessHost>(source).ptr()); | 881 Source<RenderProcessHost>(source).ptr()); |
868 break; | 882 break; |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 2007 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
1994 SiteInstance* instance) { | 2008 SiteInstance* instance) { |
1995 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 2009 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
1996 if (iter != proxy_hosts_.end()) { | 2010 if (iter != proxy_hosts_.end()) { |
1997 delete iter->second; | 2011 delete iter->second; |
1998 proxy_hosts_.erase(iter); | 2012 proxy_hosts_.erase(iter); |
1999 } | 2013 } |
2000 } | 2014 } |
2001 | 2015 |
2002 } // namespace content | 2016 } // namespace content |
OLD | NEW |