| 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 #include "pdf/instance.h" | 5 #include "pdf/instance.h" |
| 6 | 6 |
| 7 #include <algorithm> // for min() | 7 #include <algorithm> // for min() |
| 8 #define _USE_MATH_DEFINES // for M_PI | 8 #define _USE_MATH_DEFINES // for M_PI |
| 9 #include <cmath> // for log() and pow() | 9 #include <cmath> // for log() and pow() |
| 10 #include <math.h> | 10 #include <math.h> |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 if (print_settings_.print_pages_called_) | 728 if (print_settings_.print_pages_called_) |
| 729 UserMetricsRecordAction("PDF.PrintPage"); | 729 UserMetricsRecordAction("PDF.PrintPage"); |
| 730 print_settings_.Clear(); | 730 print_settings_.Clear(); |
| 731 engine_->PrintEnd(); | 731 engine_->PrintEnd(); |
| 732 } | 732 } |
| 733 | 733 |
| 734 bool Instance::IsPrintScalingDisabled() { | 734 bool Instance::IsPrintScalingDisabled() { |
| 735 return !engine_->GetPrintScaling(); | 735 return !engine_->GetPrintScaling(); |
| 736 } | 736 } |
| 737 | 737 |
| 738 int32_t Instance::GetCopiesToPrint() { |
| 739 return engine_->GetCopiesToPrint(); |
| 740 } |
| 741 |
| 738 bool Instance::StartFind(const std::string& text, bool case_sensitive) { | 742 bool Instance::StartFind(const std::string& text, bool case_sensitive) { |
| 739 engine_->StartFind(text.c_str(), case_sensitive); | 743 engine_->StartFind(text.c_str(), case_sensitive); |
| 740 return true; | 744 return true; |
| 741 } | 745 } |
| 742 | 746 |
| 743 void Instance::SelectFindResult(bool forward) { | 747 void Instance::SelectFindResult(bool forward) { |
| 744 engine_->SelectFindResult(forward); | 748 engine_->SelectFindResult(forward); |
| 745 } | 749 } |
| 746 | 750 |
| 747 void Instance::StopFind() { | 751 void Instance::StopFind() { |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2719 return instance_->HasScriptableMethod(name, exception); | 2723 return instance_->HasScriptableMethod(name, exception); |
| 2720 } | 2724 } |
| 2721 | 2725 |
| 2722 pp::Var PDFScriptableObject::Call(const pp::Var& method, | 2726 pp::Var PDFScriptableObject::Call(const pp::Var& method, |
| 2723 const std::vector<pp::Var>& args, | 2727 const std::vector<pp::Var>& args, |
| 2724 pp::Var* exception) { | 2728 pp::Var* exception) { |
| 2725 return instance_->CallScriptableMethod(method, args, exception); | 2729 return instance_->CallScriptableMethod(method, args, exception); |
| 2726 } | 2730 } |
| 2727 | 2731 |
| 2728 } // namespace chrome_pdf | 2732 } // namespace chrome_pdf |
| OLD | NEW |