| 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 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 if (module()->is_crashed()) | 1670 if (module()->is_crashed()) |
| 1671 return; | 1671 return; |
| 1672 | 1672 |
| 1673 if (bound_compositor_) | 1673 if (bound_compositor_) |
| 1674 bound_compositor_->set_viewport_to_dip_scale(viewport_to_dip_scale_); | 1674 bound_compositor_->set_viewport_to_dip_scale(viewport_to_dip_scale_); |
| 1675 | 1675 |
| 1676 if (bound_graphics_2d_platform_) | 1676 if (bound_graphics_2d_platform_) |
| 1677 bound_graphics_2d_platform_->set_viewport_to_dip_scale( | 1677 bound_graphics_2d_platform_->set_viewport_to_dip_scale( |
| 1678 viewport_to_dip_scale_); | 1678 viewport_to_dip_scale_); |
| 1679 | 1679 |
| 1680 module_->renderer_ppapi_host()->set_viewport_to_dip_scale( |
| 1681 viewport_to_dip_scale_); |
| 1682 |
| 1680 // During the first view update, initialize the throttler. | 1683 // During the first view update, initialize the throttler. |
| 1681 if (!sent_initial_did_change_view_) { | 1684 if (!sent_initial_did_change_view_) { |
| 1682 if (is_flash_plugin_ && RenderThread::Get()) { | 1685 if (is_flash_plugin_ && RenderThread::Get()) { |
| 1683 RenderThread::Get()->RecordAction( | 1686 RenderThread::Get()->RecordAction( |
| 1684 base::UserMetricsAction("Flash.PluginInstanceCreated")); | 1687 base::UserMetricsAction("Flash.PluginInstanceCreated")); |
| 1685 RecordFlashSizeMetric(unobscured_rect_.width(), | 1688 RecordFlashSizeMetric(unobscured_rect_.width(), |
| 1686 unobscured_rect_.height()); | 1689 unobscured_rect_.height()); |
| 1687 } | 1690 } |
| 1688 | 1691 |
| 1689 if (throttler_) { | 1692 if (throttler_) { |
| (...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3405 const cc::TextureMailbox& mailbox) const { | 3408 const cc::TextureMailbox& mailbox) const { |
| 3406 auto it = | 3409 auto it = |
| 3407 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), | 3410 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), |
| 3408 [&mailbox](const TextureMailboxRefCount& ref_count) { | 3411 [&mailbox](const TextureMailboxRefCount& ref_count) { |
| 3409 return ref_count.first.mailbox() == mailbox.mailbox(); | 3412 return ref_count.first.mailbox() == mailbox.mailbox(); |
| 3410 }); | 3413 }); |
| 3411 return it != texture_ref_counts_.end(); | 3414 return it != texture_ref_counts_.end(); |
| 3412 } | 3415 } |
| 3413 | 3416 |
| 3414 } // namespace content | 3417 } // namespace content |
| OLD | NEW |