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/browser_plugin_embedder.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void BrowserPluginEmbedder::NavigateGuest(RenderViewHost* render_view_host, | 80 void BrowserPluginEmbedder::NavigateGuest(RenderViewHost* render_view_host, |
81 int instance_id, | 81 int instance_id, |
82 int64 frame_id, | 82 int64 frame_id, |
83 const std::string& src, | 83 const std::string& src, |
84 const gfx::Size& size) { | 84 const gfx::Size& size) { |
85 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 85 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
86 WebContentsImpl* guest_web_contents = NULL; | 86 WebContentsImpl* guest_web_contents = NULL; |
87 GURL url(src); | 87 GURL url(src); |
88 if (!guest) { | 88 if (!guest) { |
89 const std::string& host = | 89 const std::string& host = |
90 render_view_host->GetSiteInstance()->GetSite().host(); | 90 render_view_host->GetSiteInstance()->GetSiteURL().host(); |
91 guest_web_contents = WebContentsImpl::CreateGuest( | 91 guest_web_contents = WebContentsImpl::CreateGuest( |
92 web_contents()->GetBrowserContext(), | 92 web_contents()->GetBrowserContext(), |
93 host, | 93 host, |
94 instance_id); | 94 instance_id); |
95 | 95 |
96 guest = guest_web_contents->GetBrowserPluginGuest(); | 96 guest = guest_web_contents->GetBrowserPluginGuest(); |
97 guest->set_embedder_render_process_host( | 97 guest->set_embedder_render_process_host( |
98 render_view_host->GetProcess()); | 98 render_view_host->GetProcess()); |
99 | 99 |
100 guest_web_contents->GetMutableRendererPrefs()-> | 100 guest_web_contents->GetMutableRendererPrefs()-> |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 bool visible = *Details<bool>(details).ptr(); | 235 bool visible = *Details<bool>(details).ptr(); |
236 WebContentsVisibilityChanged(visible); | 236 WebContentsVisibilityChanged(visible); |
237 break; | 237 break; |
238 } | 238 } |
239 default: | 239 default: |
240 NOTREACHED() << "Unexpected notification type: " << type; | 240 NOTREACHED() << "Unexpected notification type: " << type; |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 } // namespace content | 244 } // namespace content |
OLD | NEW |