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_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Create a RenderFrameProxyHost for the guest in the embedder renderer | 123 // Create a RenderFrameProxyHost for the guest in the embedder renderer |
124 // process, so that the embedder can access the guest's window object. | 124 // process, so that the embedder can access the guest's window object. |
125 // On reattachment, we can reuse the same RenderFrameProxyHost because | 125 // On reattachment, we can reuse the same RenderFrameProxyHost because |
126 // the embedder process will always be the same even if the embedder | 126 // the embedder process will always be the same even if the embedder |
127 // WebContents changes. | 127 // WebContents changes. |
128 // | 128 // |
129 // TODO(fsamuel): Make sure this works for transferring guests across | 129 // TODO(fsamuel): Make sure this works for transferring guests across |
130 // owners in different processes. We probably need to clear the | 130 // owners in different processes. We probably need to clear the |
131 // |guest_proxy_routing_id_| and perform any necessary cleanup on Detach | 131 // |guest_proxy_routing_id_| and perform any necessary cleanup on Detach |
132 // to enable this. | 132 // to enable this. |
133 SiteInstance* owner_site_instance = owner_web_contents_->GetSiteInstance(); | 133 SiteInstanceImpl* owner_site_instance = |
| 134 owner_web_contents_->GetSiteInstance(); |
134 int proxy_routing_id = | 135 int proxy_routing_id = |
135 GetWebContents()->GetFrameTree()->root()->render_manager()-> | 136 GetWebContents()->GetFrameTree()->root()->render_manager()-> |
136 CreateRenderFrameProxy(owner_site_instance); | 137 CreateRenderFrameProxy(owner_site_instance); |
137 guest_proxy_routing_id_ = RenderFrameProxyHost::FromID( | 138 guest_proxy_routing_id_ = RenderFrameProxyHost::FromID( |
138 owner_site_instance->GetProcess()->GetID(), proxy_routing_id) | 139 owner_site_instance->GetProcess()->GetID(), proxy_routing_id) |
139 ->GetRenderViewHost()->GetRoutingID(); | 140 ->GetRenderViewHost()->GetRoutingID(); |
140 | 141 |
141 return guest_proxy_routing_id_; | 142 return guest_proxy_routing_id_; |
142 } | 143 } |
143 | 144 |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 range, character_bounds); | 1004 range, character_bounds); |
1004 } | 1005 } |
1005 #endif | 1006 #endif |
1006 | 1007 |
1007 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1008 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1008 if (delegate_) | 1009 if (delegate_) |
1009 delegate_->SetContextMenuPosition(position); | 1010 delegate_->SetContextMenuPosition(position); |
1010 } | 1011 } |
1011 | 1012 |
1012 } // namespace content | 1013 } // namespace content |
OLD | NEW |