| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // On reattachment, we can reuse the same swapped out RenderView because | 114 // On reattachment, we can reuse the same swapped out RenderView because |
| 115 // the embedder process will always be the same even if the embedder | 115 // the embedder process will always be the same even if the embedder |
| 116 // WebContents changes. | 116 // WebContents changes. |
| 117 // | 117 // |
| 118 // TODO(fsamuel): Make sure this works for transferring guests across | 118 // TODO(fsamuel): Make sure this works for transferring guests across |
| 119 // owners in different processes. We probably need to clear the | 119 // owners in different processes. We probably need to clear the |
| 120 // |guest_proxy_routing_id_| and perform any necessary cleanup on Detach | 120 // |guest_proxy_routing_id_| and perform any necessary cleanup on Detach |
| 121 // to enable this. | 121 // to enable this. |
| 122 SiteInstance* owner_site_instance = owner_web_contents_->GetSiteInstance(); | 122 SiteInstance* owner_site_instance = owner_web_contents_->GetSiteInstance(); |
| 123 guest_proxy_routing_id_ = | 123 guest_proxy_routing_id_ = |
| 124 GetWebContents()->CreateSwappedOutRenderView(owner_site_instance); | 124 GetWebContents()->GetFrameTree()->root()->render_manager()-> |
| 125 CreateRenderFrameProxy(owner_site_instance); |
| 126 |
| 125 | 127 |
| 126 return guest_proxy_routing_id_; | 128 return guest_proxy_routing_id_; |
| 127 } | 129 } |
| 128 | 130 |
| 129 int BrowserPluginGuest::LoadURLWithParams( | 131 int BrowserPluginGuest::LoadURLWithParams( |
| 130 const NavigationController::LoadURLParams& load_params) { | 132 const NavigationController::LoadURLParams& load_params) { |
| 131 GetWebContents()->GetController().LoadURLWithParams(load_params); | 133 GetWebContents()->GetController().LoadURLWithParams(load_params); |
| 132 return GetGuestProxyRoutingID(); | 134 return GetGuestProxyRoutingID(); |
| 133 } | 135 } |
| 134 | 136 |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 void BrowserPluginGuest::OnImeCompositionRangeChanged( | 971 void BrowserPluginGuest::OnImeCompositionRangeChanged( |
| 970 const gfx::Range& range, | 972 const gfx::Range& range, |
| 971 const std::vector<gfx::Rect>& character_bounds) { | 973 const std::vector<gfx::Rect>& character_bounds) { |
| 972 static_cast<RenderWidgetHostViewBase*>( | 974 static_cast<RenderWidgetHostViewBase*>( |
| 973 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( | 975 web_contents()->GetRenderWidgetHostView())->ImeCompositionRangeChanged( |
| 974 range, character_bounds); | 976 range, character_bounds); |
| 975 } | 977 } |
| 976 #endif | 978 #endif |
| 977 | 979 |
| 978 } // namespace content | 980 } // namespace content |
| OLD | NEW |