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

Side by Side Diff: printing/printing_context_win.cc

Issue 947223003: Merge: Block nested system print dialogs on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2272
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « printing/printing_context_system_dialog_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_win.h" 5 #include "printing/printing_context_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 settings_.set_device_name(device_name); 356 settings_.set_device_name(device_name);
357 PrintSettingsInitializerWin::InitPrintSettings( 357 PrintSettingsInitializerWin::InitPrintSettings(
358 context_, *dev_mode, &settings_); 358 context_, *dev_mode, &settings_);
359 359
360 return OK; 360 return OK;
361 } 361 }
362 362
363 HWND PrintingContextWin::GetRootWindow(gfx::NativeView view) { 363 HWND PrintingContextWin::GetRootWindow(gfx::NativeView view) {
364 HWND window = NULL; 364 HWND window = NULL;
365 #if defined(USE_AURA) 365 #if defined(USE_AURA)
366 if (view) 366 if (view && view->GetHost())
367 window = view->GetHost()->GetAcceleratedWidget(); 367 window = view->GetHost()->GetAcceleratedWidget();
368 #else 368 #else
369 if (view && IsWindow(view)) { 369 if (view && IsWindow(view)) {
370 window = GetAncestor(view, GA_ROOTOWNER); 370 window = GetAncestor(view, GA_ROOTOWNER);
371 } 371 }
372 #endif 372 #endif
373 if (!window) { 373 if (!window) {
374 // TODO(maruel): crbug.com/1214347 Get the right browser window instead. 374 // TODO(maruel): crbug.com/1214347 Get the right browser window instead.
375 return GetDesktopWindow(); 375 return GetDesktopWindow();
376 } 376 }
(...skipping 23 matching lines...) Expand all
400 400
401 if (canceled) { 401 if (canceled) {
402 result.reset(); 402 result.reset();
403 abort_printing_ = true; 403 abort_printing_ = true;
404 } 404 }
405 405
406 return result.Pass(); 406 return result.Pass();
407 } 407 }
408 408
409 } // namespace printing 409 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printing_context_system_dialog_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698