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

Side by Side Diff: pdf/pdf_engine.h

Issue 2864603006: Revert of Handle long press in PDF documents. (Closed)
Patch Set: Created 3 years, 7 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 virtual void SubmitForm(const std::string& url, 133 virtual void SubmitForm(const std::string& url,
134 const void* data, 134 const void* data,
135 int length) = 0; 135 int length) = 0;
136 136
137 // Pops up a file selection dialog and returns the result. 137 // Pops up a file selection dialog and returns the result.
138 virtual std::string ShowFileSelectionDialog() = 0; 138 virtual std::string ShowFileSelectionDialog() = 0;
139 139
140 // Creates and returns new URL loader for partial document requests. 140 // Creates and returns new URL loader for partial document requests.
141 virtual pp::URLLoader CreateURLLoader() = 0; 141 virtual pp::URLLoader CreateURLLoader() = 0;
142 142
143 // Calls the client's OnCallback() function in |delay_in_ms| with the given 143 // Calls the client's OnCallback() function in delay_in_ms with the given
144 // |id|. 144 // id.
145 virtual void ScheduleCallback(int id, int delay_in_ms) = 0; 145 virtual void ScheduleCallback(int id, int delay_in_ms) = 0;
146 // Calls the client's OnTouchTimerCallback() function in |delay_in_ms| with
147 // the given |id|.
148 virtual void ScheduleTouchTimerCallback(int id, int delay_in_ms) = 0;
149 146
150 // Searches the given string for "term" and returns the results. Unicode- 147 // Searches the given string for "term" and returns the results. Unicode-
151 // aware. 148 // aware.
152 struct SearchStringResult { 149 struct SearchStringResult {
153 int start_index; 150 int start_index;
154 int length; 151 int length;
155 }; 152 };
156 virtual void SearchString(const base::char16* string, 153 virtual void SearchString(const base::char16* string,
157 const base::char16* term, 154 const base::char16* term,
158 bool case_sensitive, 155 bool case_sensitive,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Returns a page's rect in screen coordinates, as well as its surrounding 244 // Returns a page's rect in screen coordinates, as well as its surrounding
248 // border areas and bottom separator. 245 // border areas and bottom separator.
249 virtual pp::Rect GetPageScreenRect(int page_index) const = 0; 246 virtual pp::Rect GetPageScreenRect(int page_index) const = 0;
250 // Gets the offset of the vertical scrollbar from the top in document 247 // Gets the offset of the vertical scrollbar from the top in document
251 // coordinates. 248 // coordinates.
252 virtual int GetVerticalScrollbarYPosition() = 0; 249 virtual int GetVerticalScrollbarYPosition() = 0;
253 // Set color / grayscale rendering modes. 250 // Set color / grayscale rendering modes.
254 virtual void SetGrayscale(bool grayscale) = 0; 251 virtual void SetGrayscale(bool grayscale) = 0;
255 // Callback for timer that's set with ScheduleCallback(). 252 // Callback for timer that's set with ScheduleCallback().
256 virtual void OnCallback(int id) = 0; 253 virtual void OnCallback(int id) = 0;
257 // Callback for timer that's set with ScheduleTouchTimerCallback().
258 virtual void OnTouchTimerCallback(int id) = 0;
259 // Get the number of characters on a given page. 254 // Get the number of characters on a given page.
260 virtual int GetCharCount(int page_index) = 0; 255 virtual int GetCharCount(int page_index) = 0;
261 // Get the bounds in page pixels of a character on a given page. 256 // Get the bounds in page pixels of a character on a given page.
262 virtual pp::FloatRect GetCharBounds(int page_index, int char_index) = 0; 257 virtual pp::FloatRect GetCharBounds(int page_index, int char_index) = 0;
263 // Get a given unicode character on a given page. 258 // Get a given unicode character on a given page.
264 virtual uint32_t GetCharUnicode(int page_index, int char_index) = 0; 259 virtual uint32_t GetCharUnicode(int page_index, int char_index) = 0;
265 // Given a start char index, find the longest continuous run of text that's 260 // Given a start char index, find the longest continuous run of text that's
266 // in a single direction and with the same style and font size. Return the 261 // in a single direction and with the same style and font size. Return the
267 // length of that sequence and its font size and bounding box. 262 // length of that sequence and its font size and bounding box.
268 virtual void GetTextRunInfo(int page_index, 263 virtual void GetTextRunInfo(int page_index,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 362 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
368 int pdf_buffer_size, 363 int pdf_buffer_size,
369 int page_number, 364 int page_number,
370 double* width, 365 double* width,
371 double* height) = 0; 366 double* height) = 0;
372 }; 367 };
373 368
374 } // namespace chrome_pdf 369 } // namespace chrome_pdf
375 370
376 #endif // PDF_PDF_ENGINE_H_ 371 #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