| OLD | NEW |
| 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_OUT_OF_PROCESS_INSTANCE_H_ | 5 #ifndef PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ | 6 #define PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // Figures out the location of any background rectangles (i.e. those that | 152 // Figures out the location of any background rectangles (i.e. those that |
| 153 // aren't painted by the PDF engine). | 153 // aren't painted by the PDF engine). |
| 154 void CalculateBackgroundParts(); | 154 void CalculateBackgroundParts(); |
| 155 | 155 |
| 156 // Computes document width/height in device pixels, based on current zoom and | 156 // Computes document width/height in device pixels, based on current zoom and |
| 157 // device scale | 157 // device scale |
| 158 int GetDocumentPixelWidth() const; | 158 int GetDocumentPixelWidth() const; |
| 159 int GetDocumentPixelHeight() const; | 159 int GetDocumentPixelHeight() const; |
| 160 | 160 |
| 161 // Draws a rectangle with the specified dimensions and color in our buffer. | 161 // Draws a rectangle with the specified dimensions and color in our buffer. |
| 162 void FillRect(const pp::Rect& rect, unsigned int color); | 162 void FillRect(const pp::Rect& rect, uint32 color); |
| 163 | 163 |
| 164 void LoadUrl(const std::string& url); | 164 void LoadUrl(const std::string& url); |
| 165 void LoadPreviewUrl(const std::string& url); | 165 void LoadPreviewUrl(const std::string& url); |
| 166 void LoadUrlInternal(const std::string& url, pp::URLLoader* loader, | 166 void LoadUrlInternal(const std::string& url, pp::URLLoader* loader, |
| 167 void (OutOfProcessInstance::* method)(int32_t)); | 167 void (OutOfProcessInstance::* method)(int32_t)); |
| 168 | 168 |
| 169 // Creates a URL loader and allows it to access all urls, i.e. not just the | 169 // Creates a URL loader and allows it to access all urls, i.e. not just the |
| 170 // frame's origin. | 170 // frame's origin. |
| 171 pp::URLLoader CreateURLLoaderInternal(); | 171 pp::URLLoader CreateURLLoaderInternal(); |
| 172 | 172 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 float device_scale_; // Current device scale factor. | 234 float device_scale_; // Current device scale factor. |
| 235 bool printing_enabled_; | 235 bool printing_enabled_; |
| 236 // True if the plugin is full-page. | 236 // True if the plugin is full-page. |
| 237 bool full_; | 237 bool full_; |
| 238 | 238 |
| 239 PaintManager paint_manager_; | 239 PaintManager paint_manager_; |
| 240 | 240 |
| 241 struct BackgroundPart { | 241 struct BackgroundPart { |
| 242 pp::Rect location; | 242 pp::Rect location; |
| 243 unsigned int color; | 243 uint32 color; |
| 244 }; | 244 }; |
| 245 std::vector<BackgroundPart> background_parts_; | 245 std::vector<BackgroundPart> background_parts_; |
| 246 | 246 |
| 247 struct PrintSettings { | 247 struct PrintSettings { |
| 248 PrintSettings() { | 248 PrintSettings() { |
| 249 Clear(); | 249 Clear(); |
| 250 } | 250 } |
| 251 void Clear() { | 251 void Clear() { |
| 252 is_printing = false; | 252 is_printing = false; |
| 253 print_pages_called_ = false; | 253 print_pages_called_ = false; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // zooming the plugin so that flickering doesn't occur while zooming. | 336 // zooming the plugin so that flickering doesn't occur while zooming. |
| 337 bool stop_scrolling_; | 337 bool stop_scrolling_; |
| 338 | 338 |
| 339 // The callback for receiving the password from the page. | 339 // The callback for receiving the password from the page. |
| 340 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; | 340 scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_; |
| 341 }; | 341 }; |
| 342 | 342 |
| 343 } // namespace chrome_pdf | 343 } // namespace chrome_pdf |
| 344 | 344 |
| 345 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ | 345 #endif // PDF_OUT_OF_PROCESS_INSTANCE_H_ |
| OLD | NEW |