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

Side by Side Diff: printing/printing_context_system_dialog_win.cc

Issue 740983002: Implement window.print() on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « printing/printing_context_system_dialog_win.h ('k') | printing/printing_context_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/printing_context_system_dialog_win.h" 5 #include "printing/printing_context_system_dialog_win.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "printing/backend/win_helper.h" 8 #include "printing/backend/win_helper.h"
9 #include "printing/print_settings_initializer_win.h" 9 #include "printing/print_settings_initializer_win.h"
10 #include "skia/ext/platform_device.h" 10 #include "skia/ext/platform_device.h"
11 11
12 namespace printing { 12 namespace printing {
13 13
14 PrintingContextSytemDialogWin::PrintingContextSytemDialogWin(Delegate* delegate) 14 PrintingContextSytemDialogWin::PrintingContextSytemDialogWin(Delegate* delegate)
15 : PrintingContextWin(delegate), dialog_box_(NULL) { 15 : PrintingContextWin(delegate), dialog_box_(NULL) {
16 } 16 }
17 17
18 PrintingContextSytemDialogWin::~PrintingContextSytemDialogWin() { 18 PrintingContextSytemDialogWin::~PrintingContextSytemDialogWin() {
19 } 19 }
20 20
21 void PrintingContextSytemDialogWin::AskUserForSettings( 21 void PrintingContextSytemDialogWin::AskUserForSettings(
22 int max_pages, 22 int max_pages,
23 bool has_selection, 23 bool has_selection,
24 bool is_scripted,
24 const PrintSettingsCallback& callback) { 25 const PrintSettingsCallback& callback) {
25 DCHECK(!in_print_job_); 26 DCHECK(!in_print_job_);
26 dialog_box_dismissed_ = false; 27 dialog_box_dismissed_ = false;
27 28
28 HWND window = GetRootWindow(delegate_->GetParentView()); 29 HWND window = GetRootWindow(delegate_->GetParentView());
29 DCHECK(window); 30 DCHECK(window);
30 31
31 // Show the OS-dependent dialog box. 32 // Show the OS-dependent dialog box.
32 // If the user press 33 // If the user press
33 // - OK, the settings are reset and reinitialized with the new settings. OK 34 // - OK, the settings are reset and reinitialized with the new settings. OK
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 261
261 if (dialog_options.hDevMode != NULL) 262 if (dialog_options.hDevMode != NULL)
262 GlobalFree(dialog_options.hDevMode); 263 GlobalFree(dialog_options.hDevMode);
263 if (dialog_options.hDevNames != NULL) 264 if (dialog_options.hDevNames != NULL)
264 GlobalFree(dialog_options.hDevNames); 265 GlobalFree(dialog_options.hDevNames);
265 266
266 return context() ? OK : FAILED; 267 return context() ? OK : FAILED;
267 } 268 }
268 269
269 } // namespace printing 270 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_system_dialog_win.h ('k') | printing/printing_context_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698