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/browser_plugin/old/old_browser_plugin_host.h" | 5 #include "content/browser/browser_plugin/old/old_browser_plugin_host.h" |
6 | 6 |
7 #include "content/browser/browser_plugin/old/old_browser_plugin_host_helper.h" | 7 #include "content/browser/browser_plugin/old/old_browser_plugin_host_helper.h" |
8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/common/old_browser_plugin_messages.h" | 10 #include "content/common/old_browser_plugin_messages.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 int container_instance_id, | 78 int container_instance_id, |
79 long long frame_id, | 79 long long frame_id, |
80 const std::string& src) { | 80 const std::string& src) { |
81 BrowserPluginHost* guest_observer = | 81 BrowserPluginHost* guest_observer = |
82 GetGuestByContainerID(container_instance_id); | 82 GetGuestByContainerID(container_instance_id); |
83 WebContentsImpl* guest_web_contents = | 83 WebContentsImpl* guest_web_contents = |
84 guest_observer ? | 84 guest_observer ? |
85 static_cast<WebContentsImpl*>(guest_observer->web_contents()): NULL; | 85 static_cast<WebContentsImpl*>(guest_observer->web_contents()): NULL; |
86 GURL url(src); | 86 GURL url(src); |
87 if (!guest_observer) { | 87 if (!guest_observer) { |
88 std::string host = render_view_host->GetSiteInstance()->GetSite().host(); | 88 std::string host = render_view_host->GetSiteInstance()->GetSiteURL().host(); |
89 GURL guest_url( | 89 GURL guest_url( |
90 base::StringPrintf("%s://%s", chrome::kGuestScheme, host.c_str())); | 90 base::StringPrintf("%s://%s", chrome::kGuestScheme, host.c_str())); |
91 // The SiteInstance of a given guest is based on the fact that it's a guest | 91 // The SiteInstance of a given guest is based on the fact that it's a guest |
92 // in addition to which platform application the guest belongs to, rather | 92 // in addition to which platform application the guest belongs to, rather |
93 // than the URL that the guest is being navigated to. | 93 // than the URL that the guest is being navigated to. |
94 SiteInstance* guest_site_instance = | 94 SiteInstance* guest_site_instance = |
95 SiteInstance::CreateForURL(web_contents()->GetBrowserContext(), | 95 SiteInstance::CreateForURL(web_contents()->GetBrowserContext(), |
96 guest_url); | 96 guest_url); |
97 guest_web_contents = | 97 guest_web_contents = |
98 WebContentsImpl::Create( | 98 WebContentsImpl::Create( |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 228 } |
229 break; | 229 break; |
230 } | 230 } |
231 default: | 231 default: |
232 NOTREACHED() << "Unexpected notification type: " << type; | 232 NOTREACHED() << "Unexpected notification type: " << type; |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 } // namespace old | 236 } // namespace old |
237 } // namespace content | 237 } // namespace content |
OLD | NEW |