| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 DestroyGuestByInstanceID(instance_id); | 265 DestroyGuestByInstanceID(instance_id); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void BrowserPluginEmbedder::SetGuestVisibility(int instance_id, | 268 void BrowserPluginEmbedder::SetGuestVisibility(int instance_id, |
| 269 bool guest_visible) { | 269 bool guest_visible) { |
| 270 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 270 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 271 if (guest) | 271 if (guest) |
| 272 guest->SetVisibility(visible_, guest_visible); | 272 guest->SetVisibility(visible_, guest_visible); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void BrowserPluginEmbedder::AllowMediaAccess(int instance_id, |
| 276 int request_id, |
| 277 bool allow) { |
| 278 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 279 if (guest) |
| 280 guest->AllowMediaAccess(web_contents(), request_id, allow); |
| 281 } |
| 282 |
| 275 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { | 283 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { |
| 276 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 284 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 277 if (guest) | 285 if (guest) |
| 278 guest->Go(relative_index); | 286 guest->Go(relative_index); |
| 279 } | 287 } |
| 280 | 288 |
| 281 void BrowserPluginEmbedder::Stop(int instance_id) { | 289 void BrowserPluginEmbedder::Stop(int instance_id) { |
| 282 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); | 290 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); |
| 283 if (guest) | 291 if (guest) |
| 284 guest->Stop(); | 292 guest->Stop(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 304 bool visible = *Details<bool>(details).ptr(); | 312 bool visible = *Details<bool>(details).ptr(); |
| 305 WebContentsVisibilityChanged(visible); | 313 WebContentsVisibilityChanged(visible); |
| 306 break; | 314 break; |
| 307 } | 315 } |
| 308 default: | 316 default: |
| 309 NOTREACHED() << "Unexpected notification type: " << type; | 317 NOTREACHED() << "Unexpected notification type: " << type; |
| 310 } | 318 } |
| 311 } | 319 } |
| 312 | 320 |
| 313 } // namespace content | 321 } // namespace content |
| OLD | NEW |