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

Unified Diff: ppapi/cpp/dev/printing_dev.h

Issue 10826072: Implement browser side of PPB_Printing resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | ppapi/cpp/dev/printing_dev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/printing_dev.h
diff --git a/ppapi/cpp/dev/printing_dev.h b/ppapi/cpp/dev/printing_dev.h
index eb20e563641f039bebad9f100661b71afd9d29fa..9d5a7dbfb226fc16a5eef1f75acb1d8b81812591 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_;
« no previous file with comments | « content/content_tests.gypi ('k') | ppapi/cpp/dev/printing_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698