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

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

Issue 7714041: Update proxy for PPP_Printing_Dev to deal with new QuerySupportedFormats (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fixes based on review Created 9 years, 4 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 | « 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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, 1857 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin,
1861 comps.scheme.len); 1858 comps.scheme.len);
1862 if (scheme == kChromeExtensionUriScheme) 1859 if (scheme == kChromeExtensionUriScheme)
1863 return SCHEME_CHROME_EXTENSION; 1860 return SCHEME_CHROME_EXTENSION;
1864 if (scheme == kDataUriScheme) 1861 if (scheme == kDataUriScheme)
1865 return SCHEME_DATA; 1862 return SCHEME_DATA;
1866 return SCHEME_OTHER; 1863 return SCHEME_OTHER;
1867 } 1864 }
1868 1865
1869 } // namespace plugin 1866 } // namespace plugin
OLDNEW
« no previous file with comments | « 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