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

Side by Side Diff: printing/printing_context_win.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « mojo/examples/launcher/launcher.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 23 matching lines...) Expand all
34 #endif 34 #endif
35 35
36 using base::Time; 36 using base::Time;
37 37
38 namespace { 38 namespace {
39 39
40 HWND GetRootWindow(gfx::NativeView view) { 40 HWND GetRootWindow(gfx::NativeView view) {
41 HWND window = NULL; 41 HWND window = NULL;
42 #if defined(USE_AURA) 42 #if defined(USE_AURA)
43 if (view) 43 if (view)
44 window = view->GetDispatcher()->host()->GetAcceleratedWidget(); 44 window = view->GetHost()->GetAcceleratedWidget();
45 #else 45 #else
46 if (view && IsWindow(view)) { 46 if (view && IsWindow(view)) {
47 window = GetAncestor(view, GA_ROOTOWNER); 47 window = GetAncestor(view, GA_ROOTOWNER);
48 } 48 }
49 #endif 49 #endif
50 if (!window) { 50 if (!window) {
51 // TODO(maruel): bug 1214347 Get the right browser window instead. 51 // TODO(maruel): bug 1214347 Get the right browser window instead.
52 return GetDesktopWindow(); 52 return GetDesktopWindow();
53 } 53 }
54 return window; 54 return window;
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 730
731 if (dialog_options.hDevMode != NULL) 731 if (dialog_options.hDevMode != NULL)
732 GlobalFree(dialog_options.hDevMode); 732 GlobalFree(dialog_options.hDevMode);
733 if (dialog_options.hDevNames != NULL) 733 if (dialog_options.hDevNames != NULL)
734 GlobalFree(dialog_options.hDevNames); 734 GlobalFree(dialog_options.hDevNames);
735 735
736 return context_ ? OK : FAILED; 736 return context_ ? OK : FAILED;
737 } 737 }
738 738
739 } // namespace printing 739 } // namespace printing
OLDNEW
« no previous file with comments | « mojo/examples/launcher/launcher.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