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

Unified Diff: printing/printing_context_win.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_win.h ('k') | printing/printing_context_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_win.cc
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index dd0e2c48097f5527fb6f52615f78ebb9e2bafe08..b0a964448cd65ec752cab0015e25712f838f8de9 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -45,26 +45,24 @@
namespace printing {
// static
-scoped_ptr<PrintingContext> PrintingContext::Create(Delegate* delegate) {
- return make_scoped_ptr<PrintingContext>(new PrintingContextWin(delegate));
-}
-
-PrintingContextWin::PrintingContextWin(Delegate* delegate)
- : PrintingContext(delegate), context_(NULL), dialog_box_(NULL) {
-}
+PrintingContext* PrintingContext::Create(const std::string& app_locale) {
+ return static_cast<PrintingContext*>(new PrintingContextWin(app_locale));
+}
+
+PrintingContextWin::PrintingContextWin(const std::string& app_locale)
+ : PrintingContext(app_locale), context_(NULL), dialog_box_(NULL) {}
PrintingContextWin::~PrintingContextWin() {
ReleaseContext();
}
void PrintingContextWin::AskUserForSettings(
- int max_pages,
- bool has_selection,
+ gfx::NativeView view, int max_pages, bool has_selection,
const PrintSettingsCallback& callback) {
DCHECK(!in_print_job_);
dialog_box_dismissed_ = false;
- HWND window = GetRootWindow(delegate_->GetParentView());
+ HWND window = GetRootWindow(view);
DCHECK(window);
// Show the OS-dependent dialog box.
« no previous file with comments | « printing/printing_context_win.h ('k') | printing/printing_context_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698