| OLD | NEW |
| 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 <winspool.h> | 7 #include <winspool.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const int kPDFA4Width = 8.27 * kPDFDpi; | 48 const int kPDFA4Width = 8.27 * kPDFDpi; |
| 49 const int kPDFA4Height = 11.69 * kPDFDpi; | 49 const int kPDFA4Height = 11.69 * kPDFDpi; |
| 50 // A3: 11.69 x 16.54 inches | 50 // A3: 11.69 x 16.54 inches |
| 51 const int kPDFA3Width = 11.69 * kPDFDpi; | 51 const int kPDFA3Width = 11.69 * kPDFDpi; |
| 52 const int kPDFA3Height = 16.54 * kPDFDpi; | 52 const int kPDFA3Height = 16.54 * kPDFDpi; |
| 53 | 53 |
| 54 HWND GetRootWindow(gfx::NativeView view) { | 54 HWND GetRootWindow(gfx::NativeView view) { |
| 55 HWND window = NULL; | 55 HWND window = NULL; |
| 56 #if defined(USE_AURA) | 56 #if defined(USE_AURA) |
| 57 if (view) | 57 if (view) |
| 58 window = view->GetRootWindow()->GetAcceleratedWidget(); | 58 window = view->GetDispatcher()->GetAcceleratedWidget(); |
| 59 #else | 59 #else |
| 60 if (view && IsWindow(view)) { | 60 if (view && IsWindow(view)) { |
| 61 window = GetAncestor(view, GA_ROOTOWNER); | 61 window = GetAncestor(view, GA_ROOTOWNER); |
| 62 } | 62 } |
| 63 #endif | 63 #endif |
| 64 if (!window) { | 64 if (!window) { |
| 65 // TODO(maruel): bug 1214347 Get the right browser window instead. | 65 // TODO(maruel): bug 1214347 Get the right browser window instead. |
| 66 return GetDesktopWindow(); | 66 return GetDesktopWindow(); |
| 67 } | 67 } |
| 68 return window; | 68 return window; |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 783 |
| 784 if (dialog_options.hDevMode != NULL) | 784 if (dialog_options.hDevMode != NULL) |
| 785 GlobalFree(dialog_options.hDevMode); | 785 GlobalFree(dialog_options.hDevMode); |
| 786 if (dialog_options.hDevNames != NULL) | 786 if (dialog_options.hDevNames != NULL) |
| 787 GlobalFree(dialog_options.hDevNames); | 787 GlobalFree(dialog_options.hDevNames); |
| 788 | 788 |
| 789 return context_ ? OK : FAILED; | 789 return context_ ? OK : FAILED; |
| 790 } | 790 } |
| 791 | 791 |
| 792 } // namespace printing | 792 } // namespace printing |
| OLD | NEW |