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::GetNumCopies() { |
| 739 return engine_->GetNumCopies(); |
| 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 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 return instance_->HasScriptableMethod(name, exception); | 2714 return instance_->HasScriptableMethod(name, exception); |
2711 } | 2715 } |
2712 | 2716 |
2713 pp::Var PDFScriptableObject::Call(const pp::Var& method, | 2717 pp::Var PDFScriptableObject::Call(const pp::Var& method, |
2714 const std::vector<pp::Var>& args, | 2718 const std::vector<pp::Var>& args, |
2715 pp::Var* exception) { | 2719 pp::Var* exception) { |
2716 return instance_->CallScriptableMethod(method, args, exception); | 2720 return instance_->CallScriptableMethod(method, args, exception); |
2717 } | 2721 } |
2718 | 2722 |
2719 } // namespace chrome_pdf | 2723 } // namespace chrome_pdf |
OLD | NEW |