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

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

Issue 2082733002: Fix for PDF find-in-page bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 scoped_refptr<PepperPluginInstanceImpl> ref(this); 1453 scoped_refptr<PepperPluginInstanceImpl> ref(this);
1454 if (!LoadFindInterface()) 1454 if (!LoadFindInterface())
1455 return false; 1455 return false;
1456 find_identifier_ = identifier; 1456 find_identifier_ = identifier;
1457 return PP_ToBool( 1457 return PP_ToBool(
1458 plugin_find_interface_->StartFind(pp_instance(), 1458 plugin_find_interface_->StartFind(pp_instance(),
1459 base::UTF16ToUTF8(search_text).c_str(), 1459 base::UTF16ToUTF8(search_text).c_str(),
1460 PP_FromBool(case_sensitive))); 1460 PP_FromBool(case_sensitive)));
1461 } 1461 }
1462 1462
1463 void PepperPluginInstanceImpl::SelectFindResult(bool forward) { 1463 void PepperPluginInstanceImpl::SelectFindResult(bool forward, int identifier) {
1464 // Keep a reference on the stack. See NOTE above. 1464 // Keep a reference on the stack. See NOTE above.
1465 scoped_refptr<PepperPluginInstanceImpl> ref(this); 1465 scoped_refptr<PepperPluginInstanceImpl> ref(this);
1466 if (LoadFindInterface()) 1466 if (!LoadFindInterface())
1467 plugin_find_interface_->SelectFindResult(pp_instance(), 1467 return;
1468 PP_FromBool(forward)); 1468 find_identifier_ = identifier;
1469 plugin_find_interface_->SelectFindResult(pp_instance(), PP_FromBool(forward));
1469 } 1470 }
1470 1471
1471 void PepperPluginInstanceImpl::StopFind() { 1472 void PepperPluginInstanceImpl::StopFind() {
1472 // Keep a reference on the stack. See NOTE above. 1473 // Keep a reference on the stack. See NOTE above.
1473 scoped_refptr<PepperPluginInstanceImpl> ref(this); 1474 scoped_refptr<PepperPluginInstanceImpl> ref(this);
1474 if (!LoadFindInterface()) 1475 if (!LoadFindInterface())
1475 return; 1476 return;
1476 find_identifier_ = -1; 1477 find_identifier_ = -1;
1477 plugin_find_interface_->StopFind(pp_instance()); 1478 plugin_find_interface_->StopFind(pp_instance());
1478 } 1479 }
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
3405 const cc::TextureMailbox& mailbox) const { 3406 const cc::TextureMailbox& mailbox) const {
3406 auto it = 3407 auto it =
3407 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(), 3408 std::find_if(texture_ref_counts_.begin(), texture_ref_counts_.end(),
3408 [&mailbox](const TextureMailboxRefCount& ref_count) { 3409 [&mailbox](const TextureMailboxRefCount& ref_count) {
3409 return ref_count.first.mailbox() == mailbox.mailbox(); 3410 return ref_count.first.mailbox() == mailbox.mailbox();
3410 }); 3411 });
3411 return it != texture_ref_counts_.end(); 3412 return it != texture_ref_counts_.end();
3412 } 3413 }
3413 3414
3414 } // namespace content 3415 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | content/renderer/pepper/pepper_webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698