| 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 "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" | 8 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" |
| 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" | 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // can be granted to the guest process. | 189 // can be granted to the guest process. |
| 190 guest_web_contents->GetController().LoadURL(url, | 190 guest_web_contents->GetController().LoadURL(url, |
| 191 Referrer(), | 191 Referrer(), |
| 192 PAGE_TRANSITION_AUTO_TOPLEVEL, | 192 PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 193 std::string()); | 193 std::string()); |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 | 196 |
| 197 void BrowserPluginEmbedder::UpdateRectACK( | 197 void BrowserPluginEmbedder::UpdateRectACK( |
| 198 int instance_id, | 198 int instance_id, |
| 199 int message_id, | |
| 200 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | 199 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 201 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { | 200 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { |
| 202 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 201 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 203 if (guest) | 202 if (guest) |
| 204 guest->UpdateRectACK(message_id, auto_size_params, resize_guest_params); | 203 guest->UpdateRectACK(auto_size_params, resize_guest_params); |
| 205 } | 204 } |
| 206 | 205 |
| 207 void BrowserPluginEmbedder::ResizeGuest( | 206 void BrowserPluginEmbedder::ResizeGuest( |
| 208 RenderViewHost* render_view_host, | 207 RenderViewHost* render_view_host, |
| 209 int instance_id, | 208 int instance_id, |
| 210 const BrowserPluginHostMsg_ResizeGuest_Params& params) { | 209 const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
| 211 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 210 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 212 if (guest) | 211 if (guest) |
| 213 guest->Resize(render_view_host, params); | 212 guest->Resize(render_view_host, params); |
| 214 } | 213 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool visible = *Details<bool>(details).ptr(); | 378 bool visible = *Details<bool>(details).ptr(); |
| 380 WebContentsVisibilityChanged(visible); | 379 WebContentsVisibilityChanged(visible); |
| 381 break; | 380 break; |
| 382 } | 381 } |
| 383 default: | 382 default: |
| 384 NOTREACHED() << "Unexpected notification type: " << type; | 383 NOTREACHED() << "Unexpected notification type: " << type; |
| 385 } | 384 } |
| 386 } | 385 } |
| 387 | 386 |
| 388 } // namespace content | 387 } // namespace content |
| OLD | NEW |