Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(541)

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 8041052: Add IsScalingDisabled and PP_PRINTOUTPUTFORMAT_EMF to pepper printing interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 proxy->GetPluginInterface(PPP_PRINTING_DEV_INTERFACE)); 336 proxy->GetPluginInterface(PPP_PRINTING_DEV_INTERFACE));
337 } 337 }
338 338
339 uint32_t QuerySupportedPrintOutputFormats() { 339 uint32_t QuerySupportedPrintOutputFormats() {
340 if (ppp_printing_ != NULL) { 340 if (ppp_printing_ != NULL) {
341 return ppp_printing_->QuerySupportedFormats(plugin_->pp_instance()); 341 return ppp_printing_->QuerySupportedFormats(plugin_->pp_instance());
342 } 342 }
343 return 0; 343 return 0;
344 } 344 }
345 345
346 bool IsPrintScalingDisabled() {
347 if (ppp_printing_ != NULL) {
348 return ppp_printing_->IsScalingDisabled(plugin_->pp_instance());
349 }
350 return false;
351 }
352
346 int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) { 353 int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) {
347 if (ppp_printing_ != NULL) { 354 if (ppp_printing_ != NULL) {
348 return ppp_printing_->Begin(plugin_->pp_instance(), &print_settings); 355 return ppp_printing_->Begin(plugin_->pp_instance(), &print_settings);
349 } 356 }
350 return 0; 357 return 0;
351 } 358 }
352 359
353 pp::Resource PrintPages(const PP_PrintPageNumberRange_Dev* page_ranges, 360 pp::Resource PrintPages(const PP_PrintPageNumberRange_Dev* page_ranges,
354 uint32_t page_range_count) { 361 uint32_t page_range_count) {
355 if (ppp_printing_ != NULL) { 362 if (ppp_printing_ != NULL) {
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, 1968 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin,
1962 comps.scheme.len); 1969 comps.scheme.len);
1963 if (scheme == kChromeExtensionUriScheme) 1970 if (scheme == kChromeExtensionUriScheme)
1964 return SCHEME_CHROME_EXTENSION; 1971 return SCHEME_CHROME_EXTENSION;
1965 if (scheme == kDataUriScheme) 1972 if (scheme == kDataUriScheme)
1966 return SCHEME_DATA; 1973 return SCHEME_DATA;
1967 return SCHEME_OTHER; 1974 return SCHEME_OTHER;
1968 } 1975 }
1969 1976
1970 } // namespace plugin 1977 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698