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

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: Work around cross-platform whitespace difference in print preview test 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 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 bool PepperPluginInstanceImpl::PrepareTextureMailbox( 2125 bool PepperPluginInstanceImpl::PrepareTextureMailbox(
2126 cc::TextureMailbox* mailbox, 2126 cc::TextureMailbox* mailbox,
2127 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, 2127 std::unique_ptr<cc::SingleReleaseCallback>* release_callback,
2128 bool use_shared_memory) { 2128 bool use_shared_memory) {
2129 if (!bound_graphics_2d_platform_) 2129 if (!bound_graphics_2d_platform_)
2130 return false; 2130 return false;
2131 return bound_graphics_2d_platform_->PrepareTextureMailbox(mailbox, 2131 return bound_graphics_2d_platform_->PrepareTextureMailbox(mailbox,
2132 release_callback); 2132 release_callback);
2133 } 2133 }
2134 2134
2135 void PepperPluginInstanceImpl::AccessibilityModeChanged() {
2136 if (render_frame_->render_accessibility() && LoadPdfInterface())
2137 plugin_pdf_interface_->EnableAccessibility(pp_instance());
2138 }
2139
2135 void PepperPluginInstanceImpl::OnDestruct() { render_frame_ = NULL; } 2140 void PepperPluginInstanceImpl::OnDestruct() { render_frame_ = NULL; }
2136 2141
2137 void PepperPluginInstanceImpl::OnThrottleStateChange() { 2142 void PepperPluginInstanceImpl::OnThrottleStateChange() {
2138 SendDidChangeView(); 2143 SendDidChangeView();
2139 2144
2140 bool is_throttled = throttler_->IsThrottled(); 2145 bool is_throttled = throttler_->IsThrottled();
2141 render_frame()->Send(new FrameHostMsg_PluginInstanceThrottleStateChange( 2146 render_frame()->Send(new FrameHostMsg_PluginInstanceThrottleStateChange(
2142 module_->GetPluginChildId(), pp_instance_, is_throttled)); 2147 module_->GetPluginChildId(), pp_instance_, is_throttled));
2143 } 2148 }
2144 2149
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 } 3007 }
3003 3008
3004 return PP_EXTERNAL_PLUGIN_OK; 3009 return PP_EXTERNAL_PLUGIN_OK;
3005 } 3010 }
3006 3011
3007 bool PepperPluginInstanceImpl::IsValidInstanceOf(PluginModule* module) { 3012 bool PepperPluginInstanceImpl::IsValidInstanceOf(PluginModule* module) {
3008 DCHECK(module); 3013 DCHECK(module);
3009 return module == module_.get() || module == original_module_.get(); 3014 return module == module_.get() || module == original_module_.get();
3010 } 3015 }
3011 3016
3017 RenderFrame* PepperPluginInstanceImpl::GetRenderFrame() {
3018 return render_frame_;
3019 }
3020
3012 RenderView* PepperPluginInstanceImpl::GetRenderView() { 3021 RenderView* PepperPluginInstanceImpl::GetRenderView() {
3013 return render_frame_ ? render_frame_->render_view() : NULL; 3022 return render_frame_ ? render_frame_->render_view() : NULL;
3014 } 3023 }
3015 3024
3016 blink::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() { 3025 blink::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() {
3017 return container_; 3026 return container_;
3018 } 3027 }
3019 3028
3020 v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const { return isolate_; } 3029 v8::Isolate* PepperPluginInstanceImpl::GetIsolate() const { return isolate_; }
3021 3030
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
3419 const cc::TextureMailbox& mailbox) const { 3428 const cc::TextureMailbox& mailbox) const {
3420 auto it = 3429 auto it =
3421 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3430 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3422 [&mailbox](const TextureMailboxRefCount& ref_count) { 3431 [&mailbox](const TextureMailboxRefCount& ref_count) {
3423 return ref_count.first.mailbox() == mailbox.mailbox(); 3432 return ref_count.first.mailbox() == mailbox.mailbox();
3424 }); 3433 });
3425 return it != texture_ref_counts_.end(); 3434 return it != texture_ref_counts_.end();
3426 } 3435 }
3427 3436
3428 } // namespace content 3437 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698