Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 2100753003: Enable PDF accessibility when RenderFrame's accessibility mode changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, 2126 std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
2127 bool use_shared_memory) { 2127 bool use_shared_memory) {
2128 if (!bound_graphics_2d_platform_) 2128 if (!bound_graphics_2d_platform_)
2129 return false; 2129 return false;
2130 return bound_graphics_2d_platform_->PrepareTextureMailbox(mailbox, 2130 return bound_graphics_2d_platform_->PrepareTextureMailbox(mailbox,
2131 release_callback); 2131 release_callback);
2132 } 2132 }
2133 2133
2134 void PepperPluginInstanceImpl::OnDestruct() { render_frame_ = NULL; } 2134 void PepperPluginInstanceImpl::OnDestruct() { render_frame_ = NULL; }
2135 2135
2136 void PepperPluginInstanceImpl::AccessibilityModeChanged() {
raymes 2016/06/28 00:02:12 nit: this should go before OnDestruct
dmazzoni 2016/06/28 17:14:06 Done.
2137 if (render_frame_->render_accessibility() && LoadPdfInterface())
2138 plugin_pdf_interface_->EnableAccessibility(pp_instance());
2139 }
2140
2136 void PepperPluginInstanceImpl::OnThrottleStateChange() { 2141 void PepperPluginInstanceImpl::OnThrottleStateChange() {
2137 SendDidChangeView(); 2142 SendDidChangeView();
2138 2143
2139 bool is_throttled = throttler_->IsThrottled(); 2144 bool is_throttled = throttler_->IsThrottled();
2140 render_frame()->Send(new FrameHostMsg_PluginInstanceThrottleStateChange( 2145 render_frame()->Send(new FrameHostMsg_PluginInstanceThrottleStateChange(
2141 module_->GetPluginChildId(), pp_instance_, is_throttled)); 2146 module_->GetPluginChildId(), pp_instance_, is_throttled));
2142 } 2147 }
2143 2148
2144 void PepperPluginInstanceImpl::OnHiddenForPlaceholder(bool hidden) { 2149 void PepperPluginInstanceImpl::OnHiddenForPlaceholder(bool hidden) {
2145 UpdateLayer(false /* device_changed */); 2150 UpdateLayer(false /* device_changed */);
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 const cc::TextureMailbox& mailbox) const { 3422 const cc::TextureMailbox& mailbox) const {
3418 auto it = 3423 auto it =
3419 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3424 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3420 [&mailbox](const TextureMailboxRefCount& ref_count) { 3425 [&mailbox](const TextureMailboxRefCount& ref_count) {
3421 return ref_count.first.mailbox() == mailbox.mailbox(); 3426 return ref_count.first.mailbox() == mailbox.mailbox();
3422 }); 3427 });
3423 return it != texture_ref_counts_.end(); 3428 return it != texture_ref_counts_.end();
3424 } 3429 }
3425 3430
3426 } // namespace content 3431 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698