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

Unified Diff: printing/printing_context_no_system_dialog.cc

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/printing_context_no_system_dialog.h ('k') | printing/printing_context_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_no_system_dialog.cc
diff --git a/printing/printing_context_no_system_dialog.cc b/printing/printing_context_no_system_dialog.cc
index fd6e1663a33bcf18613931d0b86aa9f5e64f339a..4768e4d3a3d65ffce2285fb8631bbc593dc0ad98 100644
--- a/printing/printing_context_no_system_dialog.cc
+++ b/printing/printing_context_no_system_dialog.cc
@@ -15,13 +15,13 @@
namespace printing {
// static
-scoped_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) {
- return make_scoped_ptr<PrintingContext>(
- new PrintingContextNoSystemDialog(delegate));
+PrintingContext* PrintingContext::Create(const std::string& app_locale) {
+ return static_cast<PrintingContext*>(
+ new PrintingContextNoSystemDialog(app_locale));
}
-PrintingContextNoSystemDialog::PrintingContextNoSystemDialog(Delegate* delegate)
- : PrintingContext(delegate) {
+PrintingContextNoSystemDialog::PrintingContextNoSystemDialog(
+ const std::string& app_locale) : PrintingContext(app_locale) {
}
PrintingContextNoSystemDialog::~PrintingContextNoSystemDialog() {
@@ -29,6 +29,7 @@
}
void PrintingContextNoSystemDialog::AskUserForSettings(
+ gfx::NativeView parent_view,
int max_pages,
bool has_selection,
const PrintSettingsCallback& callback) {
@@ -53,8 +54,7 @@
int32_t width = 0;
int32_t height = 0;
UErrorCode error = U_ZERO_ERROR;
- ulocdata_getPaperSize(
- delegate_->GetAppLocale().c_str(), &height, &width, &error);
+ ulocdata_getPaperSize(app_locale_.c_str(), &height, &width, &error);
if (error > U_ZERO_ERROR) {
// If the call failed, assume a paper size of 8.5 x 11 inches.
LOG(WARNING) << "ulocdata_getPaperSize failed, using 8.5 x 11, error: "
« no previous file with comments | « printing/printing_context_no_system_dialog.h ('k') | printing/printing_context_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698