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

Unified Diff: ppapi/cpp/private/find_private.cc

Issue 195893044: Add a PPB_Find_Private function to set the tickmarks on the page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/cpp/private/find_private.cc
diff --git a/ppapi/cpp/private/find_private.cc b/ppapi/cpp/private/find_private.cc
index 0909f082a81e593fd3f8a5472aaec96d315050fb..b24644a43b947cf9c85db23c859c9df7632d87e7 100644
--- a/ppapi/cpp/private/find_private.cc
+++ b/ppapi/cpp/private/find_private.cc
@@ -8,6 +8,7 @@
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/module_impl.h"
+#include "ppapi/cpp/rect.h"
namespace pp {
@@ -83,4 +84,16 @@ void Find_Private::SelectedFindResultChanged(int32_t index) {
}
}
+void Find_Private::SetTickmarks(std::vector<pp::Rect> tickmarks) {
+ if (has_interface<PPB_Find_Private>()) {
+ if (tickmarks.size() == 0)
yzshen1 2014/03/19 17:38:05 .empty()
raymes 2014/03/20 01:53:56 Done.
+ return;
+ std::vector<PP_Rect> tickmarks_converted(tickmarks.begin(),
+ tickmarks.end());
yzshen1 2014/03/19 17:38:05 wrong indent.
raymes 2014/03/20 01:53:56 Done.
+ get_interface<PPB_Find_Private>()->SetTickmarks(
+ associated_instance_.pp_instance(), &tickmarks_converted[0],
+ tickmarks.size());
yzshen1 2014/03/19 17:38:05 you probably need to have static_cast.
raymes 2014/03/20 01:53:56 Done.
+ }
+}
+
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698