diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 23:30:41 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-27 23:30:41 +0000 |
commit | 234c139a2b9e49ebc4fa568de69c1a5c8248538b (patch) | |
tree | 7f2bbff8a839ac6f7e82c849d146928ea9cd6303 /ppapi/cpp/dev/printing_dev.h | |
parent | 8a6702b4c40143058d6750e198641a7e172db611 (diff) | |
download | chromium_src-234c139a2b9e49ebc4fa568de69c1a5c8248538b.zip chromium_src-234c139a2b9e49ebc4fa568de69c1a5c8248538b.tar.gz chromium_src-234c139a2b9e49ebc4fa568de69c1a5c8248538b.tar.bz2 |
Implement browser side of PPB_Printing resource.
This adds the browser side implementation of PPB_Printing as well as a unittest for PepperPrintingHost and a PPAPI browser_test for PPB_Printing::GetDefaultPrintSettings.
BUG=138333
TEST=content_unittests/browser_tests
Review URL: https://chromiumcodereview.appspot.com/10826072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/dev/printing_dev.h')
-rw-r--r-- | ppapi/cpp/dev/printing_dev.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ppapi/cpp/dev/printing_dev.h b/ppapi/cpp/dev/printing_dev.h index eb20e56..9d5a7db 100644 --- a/ppapi/cpp/dev/printing_dev.h +++ b/ppapi/cpp/dev/printing_dev.h @@ -6,6 +6,7 @@ #define PPAPI_CPP_DEV_PRINTING_DEV_H_ #include "ppapi/c/dev/ppp_printing_dev.h" +#include "ppapi/cpp/completion_callback.h" #include "ppapi/cpp/instance_handle.h" #include "ppapi/cpp/resource.h" @@ -15,7 +16,7 @@ class Instance; // You would typically use this either via inheritance on your instance or // by composition: see find_dev.h for an example. -class Printing_Dev { +class Printing_Dev : public Resource { public: // The instance parameter must outlive this class. explicit Printing_Dev(Instance* instance); @@ -35,9 +36,11 @@ class Printing_Dev { // interface. static bool IsAvailable(); - // Outputs the default print settings for the default printer into - // |print_settings|. Returns false on error. - bool GetDefaultPrintSettings(PP_PrintSettings_Dev* print_settings) const; + // Get the default print settings and store them in the output of |callback|. + // This method always runs asynchronously and the callback will always be + // triggered. + void GetDefaultPrintSettings( + const CompletionCallbackWithOutput<PP_PrintSettings_Dev>& callback) const; private: InstanceHandle associated_instance_; |