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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 | 88 |
89 const std::string& host = | 89 const std::string& host = |
90 render_view_host->GetSiteInstance()->GetSiteURL().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(render_view_host->GetProcess()); | 97 guest->set_embedder_render_process_host(render_view_host->GetProcess()); |
98 | 98 guest->set_embedder_web_contents(web_contents()); |
Charlie Reis
2012/10/16 21:07:21
Do we really want to set so many fields on the gue
Fady Samuel
2012/10/17 00:28:06
Done.
| |
99 RendererPreferences* guest_renderer_prefs = | 99 RendererPreferences* guest_renderer_prefs = |
100 guest_web_contents->GetMutableRendererPrefs(); | 100 guest_web_contents->GetMutableRendererPrefs(); |
101 // Copy renderer preferences (and nothing else) from the embedder's | 101 // Copy renderer preferences (and nothing else) from the embedder's |
102 // TabContents to the guest. | 102 // TabContents to the guest. |
103 // | 103 // |
104 // For GTK and Aura this is necessary to get proper renderer configuration | 104 // For GTK and Aura this is necessary to get proper renderer configuration |
105 // values for caret blinking interval, colors related to selection and | 105 // values for caret blinking interval, colors related to selection and |
106 // focus. | 106 // focus. |
107 *guest_renderer_prefs = *web_contents()->GetMutableRendererPrefs(); | 107 *guest_renderer_prefs = *web_contents()->GetMutableRendererPrefs(); |
108 | 108 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
304 bool visible = *Details<bool>(details).ptr(); | 304 bool visible = *Details<bool>(details).ptr(); |
305 WebContentsVisibilityChanged(visible); | 305 WebContentsVisibilityChanged(visible); |
306 break; | 306 break; |
307 } | 307 } |
308 default: | 308 default: |
309 NOTREACHED() << "Unexpected notification type: " << type; | 309 NOTREACHED() << "Unexpected notification type: " << type; |
310 } | 310 } |
311 } | 311 } |
312 | 312 |
313 } // namespace content | 313 } // namespace content |
OLD | NEW |