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

Side by Side Diff: pdf/pdf_engine.h

Issue 918953002: Fix for PDFs with lots of named destinations take a long time to load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 10 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 "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // document at page |index|. 267 // document at page |index|.
268 virtual void AppendPage(PDFEngine* engine, int index) = 0; 268 virtual void AppendPage(PDFEngine* engine, int index) = 0;
269 269
270 // Allow client to query and reset scroll positions in document coordinates. 270 // Allow client to query and reset scroll positions in document coordinates.
271 // Note that this is meant for cases where the device scale factor changes, 271 // Note that this is meant for cases where the device scale factor changes,
272 // and not for general scrolling - the engine will not repaint due to this. 272 // and not for general scrolling - the engine will not repaint due to this.
273 virtual pp::Point GetScrollPosition() = 0; 273 virtual pp::Point GetScrollPosition() = 0;
274 virtual void SetScrollPosition(const pp::Point& position) = 0; 274 virtual void SetScrollPosition(const pp::Point& position) = 0;
275 275
276 virtual bool IsProgressiveLoad() = 0; 276 virtual bool IsProgressiveLoad() = 0;
277 virtual pp::VarDictionary GetNamedDestinations() = 0;
278 }; 277 };
279 278
280 // Interface for exports that wrap the PDF engine. 279 // Interface for exports that wrap the PDF engine.
281 class PDFEngineExports { 280 class PDFEngineExports {
282 public: 281 public:
283 struct RenderingSettings { 282 struct RenderingSettings {
284 RenderingSettings(int dpi_x, 283 RenderingSettings(int dpi_x,
285 int dpi_y, 284 int dpi_y,
286 const pp::Rect& bounds, 285 const pp::Rect& bounds,
287 bool fit_to_bounds, 286 bool fit_to_bounds,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 328
330 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 329 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
331 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 330 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
332 int pdf_buffer_size, int page_number, 331 int pdf_buffer_size, int page_number,
333 double* width, double* height) = 0; 332 double* width, double* height) = 0;
334 }; 333 };
335 334
336 } // namespace chrome_pdf 335 } // namespace chrome_pdf
337 336
338 #endif // PDF_PDF_ENGINE_H_ 337 #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