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

Unified Diff: printing/printing_context_mac.mm

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_mac.h ('k') | printing/printing_context_no_system_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_mac.mm
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index fa907b579a44491da33bbac49a4ec2997dc44ba7..9bbe5ac1de9e67198c10f64284577d76dbfac223 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -68,12 +68,12 @@
} // namespace
// static
-scoped_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) {
- return make_scoped_ptr<PrintingContext>(new PrintingContextMac(delegate));
-}
-
-PrintingContextMac::PrintingContextMac(Delegate* delegate)
- : PrintingContext(delegate),
+PrintingContext* PrintingContext::Create(const std::string& app_locale) {
+ return static_cast<PrintingContext*>(new PrintingContextMac(app_locale));
+}
+
+PrintingContextMac::PrintingContextMac(const std::string& app_locale)
+ : PrintingContext(app_locale),
print_info_([[NSPrintInfo sharedPrintInfo] copy]),
context_(NULL) {
}
@@ -83,6 +83,7 @@
}
void PrintingContextMac::AskUserForSettings(
+ gfx::NativeView parent_view,
int max_pages,
bool has_selection,
const PrintSettingsCallback& callback) {
@@ -114,7 +115,6 @@
[panel setOptions:options];
// Set the print job title text.
- gfx::NativeView parent_view = delegate_->GetParentView();
if (parent_view) {
NSString* job_title = [[parent_view window] title];
if (job_title) {
« no previous file with comments | « printing/printing_context_mac.h ('k') | printing/printing_context_no_system_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698