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

Side by Side Diff: pdf/pdf_engine.h

Issue 2837663002: Cleanup PDF plugin code. (Closed)
Patch Set: comments 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.cc » ('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"
11 11
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 #include <windows.h> 13 #include <windows.h>
14 #endif 14 #endif
15 15
16 #include <memory>
16 #include <string> 17 #include <string>
17 #include <vector> 18 #include <vector>
18 19
19 #include "base/strings/string16.h" 20 #include "base/strings/string16.h"
20 21
21 #include "ppapi/c/dev/pp_cursor_type_dev.h" 22 #include "ppapi/c/dev/pp_cursor_type_dev.h"
22 #include "ppapi/c/dev/ppp_printing_dev.h" 23 #include "ppapi/c/dev/ppp_printing_dev.h"
23 #include "ppapi/c/ppb_input_event.h" 24 #include "ppapi/c/ppb_input_event.h"
24 #include "ppapi/cpp/completion_callback.h" 25 #include "ppapi/cpp/completion_callback.h"
25 #include "ppapi/cpp/image_data.h" 26 #include "ppapi/cpp/image_data.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 virtual bool IsPrintPreview() = 0; 183 virtual bool IsPrintPreview() = 0;
183 184
184 // Get the background color of the PDF. 185 // Get the background color of the PDF.
185 virtual uint32_t GetBackgroundColor() = 0; 186 virtual uint32_t GetBackgroundColor() = 0;
186 187
187 // Sets selection status. 188 // Sets selection status.
188 virtual void IsSelectingChanged(bool is_selecting) {} 189 virtual void IsSelectingChanged(bool is_selecting) {}
189 }; 190 };
190 191
191 // Factory method to create an instance of the PDF Engine. 192 // Factory method to create an instance of the PDF Engine.
192 static PDFEngine* Create(Client* client); 193 static std::unique_ptr<PDFEngine> Create(Client* client);
193 194
194 virtual ~PDFEngine() {} 195 virtual ~PDFEngine() {}
195 196
196 // Most of these functions are similar to the Pepper functions of the same 197 // Most of these functions are similar to the Pepper functions of the same
197 // name, so not repeating the description here unless it's different. 198 // name, so not repeating the description here unless it's different.
198 virtual bool New(const char* url, const char* headers) = 0; 199 virtual bool New(const char* url, const char* headers) = 0;
199 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0; 200 virtual void PageOffsetUpdated(const pp::Point& page_offset) = 0;
200 virtual void PluginSizeUpdated(const pp::Size& size) = 0; 201 virtual void PluginSizeUpdated(const pp::Size& size) = 0;
201 virtual void ScrolledToXPosition(int position) = 0; 202 virtual void ScrolledToXPosition(int position) = 0;
202 virtual void ScrolledToYPosition(int position) = 0; 203 virtual void ScrolledToYPosition(int position) = 0;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 362 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
362 int pdf_buffer_size, 363 int pdf_buffer_size,
363 int page_number, 364 int page_number,
364 double* width, 365 double* width,
365 double* height) = 0; 366 double* height) = 0;
366 }; 367 };
367 368
368 } // namespace chrome_pdf 369 } // namespace chrome_pdf
369 370
370 #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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698