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/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bit_cast.h" | 10 #include "base/bit_cast.h" |
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 compositor_layer_ = bound_compositor_->layer(); | 2113 compositor_layer_ = bound_compositor_->layer(); |
2114 web_layer_.reset(new cc_blink::WebLayerImpl(compositor_layer_)); | 2114 web_layer_.reset(new cc_blink::WebLayerImpl(compositor_layer_)); |
2115 } | 2115 } |
2116 | 2116 |
2117 if (web_layer_) { | 2117 if (web_layer_) { |
2118 if (fullscreen_container_) { | 2118 if (fullscreen_container_) { |
2119 fullscreen_container_->SetLayer(web_layer_.get()); | 2119 fullscreen_container_->SetLayer(web_layer_.get()); |
2120 } else { | 2120 } else { |
2121 container_->setWebLayer(web_layer_.get()); | 2121 container_->setWebLayer(web_layer_.get()); |
2122 } | 2122 } |
| 2123 if (is_flash_plugin_) { |
| 2124 web_layer_->ccLayer()->SetMayContainVideo(true); |
| 2125 } |
2123 } | 2126 } |
2124 | 2127 |
2125 layer_bound_to_fullscreen_ = !!fullscreen_container_; | 2128 layer_bound_to_fullscreen_ = !!fullscreen_container_; |
2126 layer_is_hardware_ = want_3d_layer; | 2129 layer_is_hardware_ = want_3d_layer; |
2127 UpdateLayerTransform(); | 2130 UpdateLayerTransform(); |
2128 } | 2131 } |
2129 | 2132 |
2130 bool PepperPluginInstanceImpl::PrepareTextureMailbox( | 2133 bool PepperPluginInstanceImpl::PrepareTextureMailbox( |
2131 cc::TextureMailbox* mailbox, | 2134 cc::TextureMailbox* mailbox, |
2132 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, | 2135 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3443 const cc::TextureMailbox& mailbox) const { | 3446 const cc::TextureMailbox& mailbox) const { |
3444 auto it = | 3447 auto it = |
3445 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3448 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
3446 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3449 [&mailbox](const TextureMailboxRefCount& ref_count) { |
3447 return ref_count.first.mailbox() == mailbox.mailbox(); | 3450 return ref_count.first.mailbox() == mailbox.mailbox(); |
3448 }); | 3451 }); |
3449 return it != texture_ref_counts_.end(); | 3452 return it != texture_ref_counts_.end(); |
3450 } | 3453 } |
3451 | 3454 |
3452 } // namespace content | 3455 } // namespace content |
OLD | NEW |