OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifdef _MSC_VER | 5 #ifdef _MSC_VER |
6 // Do not warn about use of std::copy with raw pointers. | 6 // Do not warn about use of std::copy with raw pointers. |
7 #pragma warning(disable : 4996) | 7 #pragma warning(disable : 4996) |
8 #endif | 8 #endif |
9 | 9 |
10 #include "native_client/src/trusted/plugin/plugin.h" | 10 #include "native_client/src/trusted/plugin/plugin.h" |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 return pp::ImageData(pp::ImageData::PassRef(), image_data); | 359 return pp::ImageData(pp::ImageData::PassRef(), image_data); |
360 } | 360 } |
361 return pp::Resource(); | 361 return pp::Resource(); |
362 } | 362 } |
363 | 363 |
364 void PrintEnd() { | 364 void PrintEnd() { |
365 if (ppp_printing_ != NULL) | 365 if (ppp_printing_ != NULL) |
366 ppp_printing_->End(plugin_->pp_instance()); | 366 ppp_printing_->End(plugin_->pp_instance()); |
367 } | 367 } |
368 | 368 |
| 369 bool IsPrintScalingDisabled() { |
| 370 if (ppp_printing_ != NULL) { |
| 371 PP_Bool result = ppp_printing_->IsScalingDisabled(plugin_->pp_instance()); |
| 372 return result == PP_TRUE; |
| 373 } |
| 374 return false; |
| 375 } |
| 376 |
369 private: | 377 private: |
370 Plugin* plugin_; | 378 Plugin* plugin_; |
371 const PPP_Printing_Dev* ppp_printing_; | 379 const PPP_Printing_Dev* ppp_printing_; |
372 | 380 |
373 NACL_DISALLOW_COPY_AND_ASSIGN(PrintingAdapter); | 381 NACL_DISALLOW_COPY_AND_ASSIGN(PrintingAdapter); |
374 }; | 382 }; |
375 | 383 |
376 | 384 |
377 // Derive a class from pp::Selection_Dev to forward PPP_Selection_Dev calls to | 385 // Derive a class from pp::Selection_Dev to forward PPP_Selection_Dev calls to |
378 // the plugin. | 386 // the plugin. |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, | 1969 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, |
1962 comps.scheme.len); | 1970 comps.scheme.len); |
1963 if (scheme == kChromeExtensionUriScheme) | 1971 if (scheme == kChromeExtensionUriScheme) |
1964 return SCHEME_CHROME_EXTENSION; | 1972 return SCHEME_CHROME_EXTENSION; |
1965 if (scheme == kDataUriScheme) | 1973 if (scheme == kDataUriScheme) |
1966 return SCHEME_DATA; | 1974 return SCHEME_DATA; |
1967 return SCHEME_OTHER; | 1975 return SCHEME_OTHER; |
1968 } | 1976 } |
1969 | 1977 |
1970 } // namespace plugin | 1978 } // namespace plugin |
OLD | NEW |