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

Side by Side Diff: pdf/pdf_engine.h

Issue 2050973003: PDF accessibility tweaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf_1_hastreedata
Patch Set: Rebase 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
« 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 250 // Gets the JSON representation of the PDF file
251 virtual std::string GetPageAsJSON(int index) = 0; 251 virtual std::string GetPageAsJSON(int index) = 0;
252 // Get the number of characters on a given page. 252 // Get the number of characters on a given page.
253 virtual int GetCharCount(int page_index) = 0; 253 virtual int GetCharCount(int page_index) = 0;
254 // Get the width in pixels of a character on a given page. 254 // Get the bounds in page pixels of a character on a given page.
255 virtual double GetCharWidth(int page_index, int char_index) = 0; 255 virtual pp::FloatRect GetCharBounds(int page_index, int char_index) = 0;
256 // Get a given unicode character on a given page. 256 // Get a given unicode character on a given page.
257 virtual uint32_t GetCharUnicode(int page_index, int char_index) = 0; 257 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 258 // 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 259 // 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. 260 // length of that sequence and its font size and bounding box.
261 virtual void GetTextRunInfo(int page_index, 261 virtual void GetTextRunInfo(int page_index,
262 int start_char_index, 262 int start_char_index,
263 uint32_t* out_len, 263 uint32_t* out_len,
264 double* out_font_size, 264 double* out_font_size,
265 pp::FloatRect* out_bounds) = 0; 265 pp::FloatRect* out_bounds) = 0;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 353 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
354 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 354 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
355 int pdf_buffer_size, int page_number, 355 int pdf_buffer_size, int page_number,
356 double* width, double* height) = 0; 356 double* width, double* height) = 0;
357 }; 357 };
358 358
359 } // namespace chrome_pdf 359 } // namespace chrome_pdf
360 360
361 #endif // PDF_PDF_ENGINE_H_ 361 #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