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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2103043003: Remove legacy PDF JSON interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo after merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 7688a7dacda3fcdc30bdf5e68a4f5ee8bc2a1bf3..05f73098ec7870b45d04f26cc6b176a2e21fb2f8 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -13,7 +13,6 @@
#include "base/i18n/icu_encoding_detection.h"
#include "base/i18n/icu_string_conversions.h"
-#include "base/json/json_writer.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -23,7 +22,6 @@
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/values.h"
#include "gin/array_buffer.h"
#include "gin/public/gin_embedders.h"
#include "gin/public/isolate_holder.h"
@@ -2294,22 +2292,6 @@ void PDFiumEngine::OnCallback(int id) {
client_->ScheduleCallback(id, timers_[id].first);
}
-std::string PDFiumEngine::GetPageAsJSON(int index) {
- if (!(HasPermission(PERMISSION_COPY) ||
- HasPermission(PERMISSION_COPY_ACCESSIBLE))) {
- return "{}";
- }
-
- if (index < 0 || static_cast<size_t>(index) > pages_.size() - 1)
- return "{}";
-
- std::unique_ptr<base::Value> node(
- pages_[index]->GetAccessibleContentAsValue(current_rotation_));
- std::string page_json;
- base::JSONWriter::Write(*node, &page_json);
- return page_json;
-}
-
int PDFiumEngine::GetCharCount(int page_index) {
DCHECK(page_index >= 0 && page_index < static_cast<int>(pages_.size()));
return pages_[page_index]->GetCharCount();
« no previous file with comments | « pdf/pdfium/pdfium_engine.h ('k') | pdf/pdfium/pdfium_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698