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

Side by Side Diff: pdf/pdf_engine.h

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, 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
« no previous file with comments | « pdf/out_of_process_instance.cc ('k') | pdf/pdfium/pdfium_engine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef PDF_PDF_ENGINE_H_ 5 #ifndef PDF_PDF_ENGINE_H_
6 #define PDF_PDF_ENGINE_H_ 6 #define PDF_PDF_ENGINE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // Returns a page's rect in screen coordinates, as well as its surrounding 240 // Returns a page's rect in screen coordinates, as well as its surrounding
241 // border areas and bottom separator. 241 // border areas and bottom separator.
242 virtual pp::Rect GetPageScreenRect(int page_index) const = 0; 242 virtual pp::Rect GetPageScreenRect(int page_index) const = 0;
243 // Gets the offset of the vertical scrollbar from the top in document 243 // Gets the offset of the vertical scrollbar from the top in document
244 // coordinates. 244 // coordinates.
245 virtual int GetVerticalScrollbarYPosition() = 0; 245 virtual int GetVerticalScrollbarYPosition() = 0;
246 // Set color / grayscale rendering modes. 246 // Set color / grayscale rendering modes.
247 virtual void SetGrayscale(bool grayscale) = 0; 247 virtual void SetGrayscale(bool grayscale) = 0;
248 // Callback for timer that's set with ScheduleCallback(). 248 // Callback for timer that's set with ScheduleCallback().
249 virtual void OnCallback(int id) = 0; 249 virtual void OnCallback(int id) = 0;
250 // Gets the JSON representation of the PDF file
251 virtual std::string GetPageAsJSON(int index) = 0;
252 // Get the number of characters on a given page. 250 // Get the number of characters on a given page.
253 virtual int GetCharCount(int page_index) = 0; 251 virtual int GetCharCount(int page_index) = 0;
254 // Get the bounds in page pixels of a character on a given page. 252 // Get the bounds in page pixels of a character on a given page.
255 virtual pp::FloatRect GetCharBounds(int page_index, int char_index) = 0; 253 virtual pp::FloatRect GetCharBounds(int page_index, int char_index) = 0;
256 // Get a given unicode character on a given page. 254 // Get a given unicode character on a given page.
257 virtual uint32_t GetCharUnicode(int page_index, int char_index) = 0; 255 virtual uint32_t GetCharUnicode(int page_index, int char_index) = 0;
258 // Given a start char index, find the longest continuous run of text that's 256 // Given a start char index, find the longest continuous run of text that's
259 // in a single direction and with the same style and font size. Return the 257 // in a single direction and with the same style and font size. Return the
260 // length of that sequence and its font size and bounding box. 258 // length of that sequence and its font size and bounding box.
261 virtual void GetTextRunInfo(int page_index, 259 virtual void GetTextRunInfo(int page_index,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 350
353 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 351 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
354 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 352 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
355 int pdf_buffer_size, int page_number, 353 int pdf_buffer_size, int page_number,
356 double* width, double* height) = 0; 354 double* width, double* height) = 0;
357 }; 355 };
358 356
359 } // namespace chrome_pdf 357 } // namespace chrome_pdf
360 358
361 #endif // PDF_PDF_ENGINE_H_ 359 #endif // PDF_PDF_ENGINE_H_
OLDNEW
« no previous file with comments | « pdf/out_of_process_instance.cc ('k') | pdf/pdfium/pdfium_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698