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

Side by Side Diff: printing/printing_context_win.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | ui/app_list/views/app_list_view.cc » ('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 (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
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
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
OLDNEW
« no previous file with comments | « content/shell/browser/shell_views.cc ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698