| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "pdf/pdfium/pdfium_page.h" | 5 #include "pdf/pdfium/pdfium_page.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 : engine_(engine), | 42 : engine_(engine), |
| 43 page_(NULL), | 43 page_(NULL), |
| 44 text_page_(NULL), | 44 text_page_(NULL), |
| 45 index_(i), | 45 index_(i), |
| 46 rect_(r), | 46 rect_(r), |
| 47 calculated_links_(false), | 47 calculated_links_(false), |
| 48 available_(available) { | 48 available_(available) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 PDFiumPage::~PDFiumPage() { | 51 PDFiumPage::~PDFiumPage() { |
| 52 Unload(); | |
| 53 } | 52 } |
| 54 | 53 |
| 55 void PDFiumPage::Unload() { | 54 void PDFiumPage::Unload() { |
| 56 if (text_page_) { | 55 if (text_page_) { |
| 57 FPDFText_ClosePage(text_page_); | 56 FPDFText_ClosePage(text_page_); |
| 58 text_page_ = NULL; | 57 text_page_ = NULL; |
| 59 } | 58 } |
| 60 | 59 |
| 61 if (page_) { | 60 if (page_) { |
| 62 if (engine_->form()) { | 61 if (engine_->form()) { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 new_left, new_top, new_right - new_left + 1, new_bottom - new_top + 1); | 468 new_left, new_top, new_right - new_left + 1, new_bottom - new_top + 1); |
| 470 } | 469 } |
| 471 | 470 |
| 472 PDFiumPage::Link::Link() { | 471 PDFiumPage::Link::Link() { |
| 473 } | 472 } |
| 474 | 473 |
| 475 PDFiumPage::Link::~Link() { | 474 PDFiumPage::Link::~Link() { |
| 476 } | 475 } |
| 477 | 476 |
| 478 } // namespace chrome_pdf | 477 } // namespace chrome_pdf |
| OLD | NEW |