| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 void BrowserPluginEmbedder::SetAutoSize( | 308 void BrowserPluginEmbedder::SetAutoSize( |
| 309 int instance_id, | 309 int instance_id, |
| 310 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | 310 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 311 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { | 311 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { |
| 312 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 312 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 313 if (guest) | 313 if (guest) |
| 314 guest->SetSize(auto_size_params, resize_guest_params); | 314 guest->SetSize(auto_size_params, resize_guest_params); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void BrowserPluginEmbedder::AllowMediaAccess(int instance_id, |
| 318 int request_id, |
| 319 bool should_allow) { |
| 320 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 321 if (guest) |
| 322 guest->AllowMediaAccess(web_contents(), request_id, should_allow); |
| 323 } |
| 324 |
| 317 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { | 325 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { |
| 318 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 326 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 319 if (guest) | 327 if (guest) |
| 320 guest->Go(relative_index); | 328 guest->Go(relative_index); |
| 321 } | 329 } |
| 322 | 330 |
| 323 void BrowserPluginEmbedder::Stop(int instance_id) { | 331 void BrowserPluginEmbedder::Stop(int instance_id) { |
| 324 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 332 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 325 if (guest) | 333 if (guest) |
| 326 guest->Stop(); | 334 guest->Stop(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 bool visible = *Details<bool>(details).ptr(); | 387 bool visible = *Details<bool>(details).ptr(); |
| 380 WebContentsVisibilityChanged(visible); | 388 WebContentsVisibilityChanged(visible); |
| 381 break; | 389 break; |
| 382 } | 390 } |
| 383 default: | 391 default: |
| 384 NOTREACHED() << "Unexpected notification type: " << type; | 392 NOTREACHED() << "Unexpected notification type: " << type; |
| 385 } | 393 } |
| 386 } | 394 } |
| 387 | 395 |
| 388 } // namespace content | 396 } // namespace content |
| OLD | NEW |