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

Unified Diff: printing/printing_context.h

Issue 504763002: Revert of Added PrintingContext::Delegate to get parent view handle and application locale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « printing/emf_win_unittest.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context.h
diff --git a/printing/printing_context.h b/printing/printing_context.h
index 875c0703de4e0a4bf214aedeffca73864f0fdc66..823a5af446678fe32d30c0eae831807e89b8997c 100644
--- a/printing/printing_context.h
+++ b/printing/printing_context.h
@@ -25,19 +25,6 @@
// printer and manage the document and page breaks.
class PRINTING_EXPORT PrintingContext {
public:
- // Printing context delegate.
- class Delegate {
- public:
- Delegate() {};
- virtual ~Delegate() {};
-
- // Returns parent view to use for modal dialogs.
- virtual gfx::NativeView GetParentView() = 0;
-
- // Returns application locale.
- virtual std::string GetAppLocale() = 0;
- };
-
// Tri-state result for user behavior-dependent functions.
enum Result {
OK,
@@ -55,7 +42,8 @@
// context with the select device settings. The result of the call is returned
// in the callback. This is necessary for Linux, which only has an
// asynchronous printing API.
- virtual void AskUserForSettings(int max_pages,
+ virtual void AskUserForSettings(gfx::NativeView parent_view,
+ int max_pages,
bool has_selection,
const PrintSettingsCallback& callback) = 0;
@@ -110,8 +98,9 @@
virtual gfx::NativeDrawingContext context() const = 0;
// Creates an instance of this object. Implementers of this interface should
- // implement this method to create an object of their implementation.
- static scoped_ptr<PrintingContext> Create(Delegate* delegate);
+ // implement this method to create an object of their implementation. The
+ // caller owns the returned object.
+ static PrintingContext* Create(const std::string& app_locale);
void set_margin_type(MarginType type);
@@ -120,7 +109,7 @@
}
protected:
- explicit PrintingContext(Delegate* delegate);
+ explicit PrintingContext(const std::string& app_locale);
// Reinitializes the settings for object reuse.
void ResetSettings();
@@ -131,9 +120,6 @@
// Complete print context settings.
PrintSettings settings_;
- // Printing context delegate.
- Delegate* delegate_;
-
// The dialog box has been dismissed.
volatile bool dialog_box_dismissed_;
@@ -143,6 +129,9 @@
// Did the user cancel the print job.
volatile bool abort_printing_;
+ // The application locale.
+ std::string app_locale_;
+
private:
DISALLOW_COPY_AND_ASSIGN(PrintingContext);
};
« no previous file with comments | « printing/emf_win_unittest.cc ('k') | printing/printing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698