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

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

Issue 7718004: ppapi: Make 0.4 the default for PPP_Printing_Dev, leave backwards-compat (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate NaCl proxy changes Created 9 years, 3 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
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #ifdef _MSC_VER 7 #ifdef _MSC_VER
8 // Do not warn about use of std::copy with raw pointers. 8 // Do not warn about use of std::copy with raw pointers.
9 #pragma warning(disable : 4996) 9 #pragma warning(disable : 4996)
10 #endif 10 #endif
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 public: 303 public:
304 explicit PrintingAdapter(Plugin* plugin) 304 explicit PrintingAdapter(Plugin* plugin)
305 : pp::Printing_Dev(plugin), 305 : pp::Printing_Dev(plugin),
306 plugin_(plugin) { 306 plugin_(plugin) {
307 BrowserPpp* proxy = plugin_->ppapi_proxy(); 307 BrowserPpp* proxy = plugin_->ppapi_proxy();
308 CHECK(proxy != NULL); 308 CHECK(proxy != NULL);
309 ppp_printing_ = static_cast<const PPP_Printing_Dev*>( 309 ppp_printing_ = static_cast<const PPP_Printing_Dev*>(
310 proxy->GetPluginInterface(PPP_PRINTING_DEV_INTERFACE)); 310 proxy->GetPluginInterface(PPP_PRINTING_DEV_INTERFACE));
311 } 311 }
312 312
313 PP_PrintOutputFormat_Dev* 313 uint32_t QuerySupportedPrintOutputFormats() {
314 QuerySupportedPrintOutputFormats(uint32_t* format_count) {
315 if (ppp_printing_ != NULL) { 314 if (ppp_printing_ != NULL) {
316 return ppp_printing_->QuerySupportedFormats(plugin_->pp_instance(), 315 return ppp_printing_->QuerySupportedFormats(plugin_->pp_instance());
317 format_count);
318 } 316 }
319 *format_count = 0; 317 return 0;
320 return NULL;
321 } 318 }
322 319
323 int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) { 320 int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) {
324 if (ppp_printing_ != NULL) { 321 if (ppp_printing_ != NULL) {
325 return ppp_printing_->Begin(plugin_->pp_instance(), &print_settings); 322 return ppp_printing_->Begin(plugin_->pp_instance(), &print_settings);
326 } 323 }
327 return 0; 324 return 0;
328 } 325 }
329 326
330 pp::Resource PrintPages(const PP_PrintPageNumberRange_Dev* page_ranges, 327 pp::Resource PrintPages(const PP_PrintPageNumberRange_Dev* page_ranges,
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, 1862 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin,
1866 comps.scheme.len); 1863 comps.scheme.len);
1867 if (scheme == kChromeExtensionUriScheme) 1864 if (scheme == kChromeExtensionUriScheme)
1868 return SCHEME_CHROME_EXTENSION; 1865 return SCHEME_CHROME_EXTENSION;
1869 if (scheme == kDataUriScheme) 1866 if (scheme == kDataUriScheme)
1870 return SCHEME_DATA; 1867 return SCHEME_DATA;
1871 return SCHEME_OTHER; 1868 return SCHEME_OTHER;
1872 } 1869 }
1873 1870
1874 } // namespace plugin 1871 } // namespace plugin
OLDNEW
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppp_rpc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698