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_web_contents_observer.h" | 5 #include "content/browser/browser_plugin/browser_plugin_web_contents_observer.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.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/browser_plugin_messages.h" | 10 #include "content/common/browser_plugin_messages.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 GURL url(src); | 88 GURL url(src); |
89 SiteInstance* site_instance = | 89 SiteInstance* site_instance = |
90 SiteInstance::CreateForURL( | 90 SiteInstance::CreateForURL( |
91 browser_context, url); | 91 browser_context, url); |
92 WebContentsImpl* guest_web_contents = | 92 WebContentsImpl* guest_web_contents = |
93 static_cast<WebContentsImpl*>( | 93 static_cast<WebContentsImpl*>( |
94 WebContents::Create( | 94 WebContents::Create( |
95 browser_context, | 95 browser_context, |
96 site_instance, | 96 site_instance, |
97 MSG_ROUTING_NONE, | 97 MSG_ROUTING_NONE, |
98 NULL, // base tab contents | 98 NULL, // base WebContents |
99 NULL // session storage namespace | 99 NULL // session storage namespace |
100 )); | 100 )); |
101 // TODO(fsamuel): Set the WebContentsDelegate here. | 101 // TODO(fsamuel): Set the WebContentsDelegate here. |
102 RenderViewHostImpl* guest_render_view_host = | 102 RenderViewHostImpl* guest_render_view_host = |
103 static_cast<RenderViewHostImpl*>( | 103 static_cast<RenderViewHostImpl*>( |
104 guest_web_contents->GetRenderViewHost()); | 104 guest_web_contents->GetRenderViewHost()); |
105 | 105 |
106 // We need to make sure that the RenderViewHost knows that it's | 106 // We need to make sure that the RenderViewHost knows that it's |
107 // hosting a guest RenderView so that it informs the RenderView | 107 // hosting a guest RenderView so that it informs the RenderView |
108 // on a ViewMsg_New. Guest RenderViews will avoid compositing | 108 // on a ViewMsg_New. Guest RenderViews will avoid compositing |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 it != guests_.end(); ++it) { | 219 it != guests_.end(); ++it) { |
220 WebContentsImpl* web_contents = it->first; | 220 WebContentsImpl* web_contents = it->first; |
221 if (visible) | 221 if (visible) |
222 web_contents->ShowContents(); | 222 web_contents->ShowContents(); |
223 else | 223 else |
224 web_contents->HideContents(); | 224 web_contents->HideContents(); |
225 } | 225 } |
226 } | 226 } |
227 | 227 |
228 } // namespace content | 228 } // namespace content |
OLD | NEW |