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

Side by Side Diff: trunk/src/ui/shell_dialogs/base_shell_dialog_win.cc

Issue 164013002: Revert 230235 "Use BaseShellDialog for print dialog on Windows" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
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 "ui/shell_dialogs/base_shell_dialog_win.h" 5 #include "ui/shell_dialogs/base_shell_dialog_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "base/win/scoped_com_initializer.h" 10 #include "base/win/scoped_com_initializer.h"
(...skipping 12 matching lines...) Expand all
23 // All runs should be complete by the time this is called! 23 // All runs should be complete by the time this is called!
24 if (--instance_count_ == 0) 24 if (--instance_count_ == 0)
25 DCHECK(owners_.empty()); 25 DCHECK(owners_.empty());
26 } 26 }
27 27
28 BaseShellDialogImpl::RunState BaseShellDialogImpl::BeginRun(HWND owner) { 28 BaseShellDialogImpl::RunState BaseShellDialogImpl::BeginRun(HWND owner) {
29 // Cannot run a modal shell dialog if one is already running for this owner. 29 // Cannot run a modal shell dialog if one is already running for this owner.
30 DCHECK(!IsRunningDialogForOwner(owner)); 30 DCHECK(!IsRunningDialogForOwner(owner));
31 // The owner must be a top level window, otherwise we could end up with two 31 // The owner must be a top level window, otherwise we could end up with two
32 // entries in our map for the same top level window. 32 // entries in our map for the same top level window.
33 // TODO(scottmg): This should be re-enabled when Chrome Frame is removed. 33 DCHECK(!owner || owner == GetAncestor(owner, GA_ROOT));
34 // http://crbug.com/310264
35 // DCHECK(!owner || owner == GetAncestor(owner, GA_ROOT));
36 RunState run_state; 34 RunState run_state;
37 run_state.dialog_thread = CreateDialogThread(); 35 run_state.dialog_thread = CreateDialogThread();
38 run_state.owner = owner; 36 run_state.owner = owner;
39 if (owner) { 37 if (owner) {
40 owners_.insert(owner); 38 owners_.insert(owner);
41 DisableOwner(owner); 39 DisableOwner(owner);
42 } 40 }
43 return run_state; 41 return run_state;
44 } 42 }
45 43
(...skipping 25 matching lines...) Expand all
71 DCHECK(started); 69 DCHECK(started);
72 return thread; 70 return thread;
73 } 71 }
74 72
75 void BaseShellDialogImpl::EnableOwner(HWND owner) { 73 void BaseShellDialogImpl::EnableOwner(HWND owner) {
76 if (IsWindow(owner)) 74 if (IsWindow(owner))
77 EnableWindow(owner, TRUE); 75 EnableWindow(owner, TRUE);
78 } 76 }
79 77
80 } // namespace ui 78 } // namespace ui
OLDNEW
« no previous file with comments | « trunk/src/printing/printing_context_win.cc ('k') | trunk/src/ui/shell_dialogs/print_settings_dialog_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698