OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/app_modal_dialog_queue.h" | 5 #include "chrome/browser/app_modal_dialog_queue.h" |
6 | 6 |
7 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" |
8 | 8 |
9 void AppModalDialogQueue::AddDialog(AppModalDialog* dialog) { | 9 void AppModalDialogQueue::AddDialog(AppModalDialog* dialog) { |
10 if (!active_dialog_) { | 10 if (!active_dialog_) { |
(...skipping 12 matching lines...) Expand all Loading... |
23 active_dialog_ = NULL; | 23 active_dialog_ = NULL; |
24 } | 24 } |
25 } | 25 } |
26 | 26 |
27 void AppModalDialogQueue::ActivateModalDialog() { | 27 void AppModalDialogQueue::ActivateModalDialog() { |
28 if (active_dialog_) | 28 if (active_dialog_) |
29 active_dialog_->ActivateModalDialog(); | 29 active_dialog_->ActivateModalDialog(); |
30 } | 30 } |
31 | 31 |
32 void AppModalDialogQueue::ShowModalDialog(AppModalDialog* dialog) { | 32 void AppModalDialogQueue::ShowModalDialog(AppModalDialog* dialog) { |
33 // Set active_dialog_ before showing it, because ShowModalDialog can wind up | 33 dialog->ShowModalDialog(); |
34 // calling ShowNextDialog in some cases, which will change active_dialog_. | |
35 active_dialog_ = dialog; | 34 active_dialog_ = dialog; |
36 dialog->ShowModalDialog(); | |
37 } | 35 } |
OLD | NEW |