| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 void BrowserPluginEmbedder::ResizeGuest( | 207 void BrowserPluginEmbedder::ResizeGuest( |
| 208 RenderViewHost* render_view_host, | 208 RenderViewHost* render_view_host, |
| 209 int instance_id, | 209 int instance_id, |
| 210 const BrowserPluginHostMsg_ResizeGuest_Params& params) { | 210 const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
| 211 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 211 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 212 if (guest) | 212 if (guest) |
| 213 guest->Resize(render_view_host, params); | 213 guest->Resize(render_view_host, params); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void BrowserPluginEmbedder::SetName(int instance_id, const std::string& name) { |
| 217 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 218 if (guest) |
| 219 guest->SetName(name); |
| 220 } |
| 221 |
| 216 void BrowserPluginEmbedder::SetFocus(int instance_id, | 222 void BrowserPluginEmbedder::SetFocus(int instance_id, |
| 217 bool focused) { | 223 bool focused) { |
| 218 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 224 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 219 if (guest) | 225 if (guest) |
| 220 guest->SetFocus(focused); | 226 guest->SetFocus(focused); |
| 221 } | 227 } |
| 222 | 228 |
| 223 void BrowserPluginEmbedder::CleanUp() { | 229 void BrowserPluginEmbedder::CleanUp() { |
| 224 // Destroy guests that are managed by the current embedder. | 230 // Destroy guests that are managed by the current embedder. |
| 225 STLDeleteContainerPairSecondPointers( | 231 STLDeleteContainerPairSecondPointers( |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool visible = *Details<bool>(details).ptr(); | 385 bool visible = *Details<bool>(details).ptr(); |
| 380 WebContentsVisibilityChanged(visible); | 386 WebContentsVisibilityChanged(visible); |
| 381 break; | 387 break; |
| 382 } | 388 } |
| 383 default: | 389 default: |
| 384 NOTREACHED() << "Unexpected notification type: " << type; | 390 NOTREACHED() << "Unexpected notification type: " << type; |
| 385 } | 391 } |
| 386 } | 392 } |
| 387 | 393 |
| 388 } // namespace content | 394 } // namespace content |
| OLD | NEW |