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

Side by Side Diff: components/app_modal/app_modal_dialog_queue.cc

Issue 688853005: Consolidate javascript_dialog_manager.h and javascript_dialog_manager_impl.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "components/app_modal/app_modal_dialog_queue.h" 5 #include "components/app_modal/app_modal_dialog_queue.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "components/app_modal/app_modal_dialog.h" 8 #include "components/app_modal/app_modal_dialog.h"
9 9
10 namespace app_modal {
11
10 // static 12 // static
11 AppModalDialogQueue* AppModalDialogQueue::GetInstance() { 13 AppModalDialogQueue* AppModalDialogQueue::GetInstance() {
12 return Singleton<AppModalDialogQueue>::get(); 14 return Singleton<AppModalDialogQueue>::get();
13 } 15 }
14 16
15 void AppModalDialogQueue::AddDialog(AppModalDialog* dialog) { 17 void AppModalDialogQueue::AddDialog(AppModalDialog* dialog) {
16 if (!active_dialog_) { 18 if (!active_dialog_) {
17 ShowModalDialog(dialog); 19 ShowModalDialog(dialog);
18 return; 20 return;
19 } 21 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 AppModalDialog* AppModalDialogQueue::GetNextDialog() { 69 AppModalDialog* AppModalDialogQueue::GetNextDialog() {
68 while (!app_modal_dialog_queue_.empty()) { 70 while (!app_modal_dialog_queue_.empty()) {
69 AppModalDialog* dialog = app_modal_dialog_queue_.front(); 71 AppModalDialog* dialog = app_modal_dialog_queue_.front();
70 app_modal_dialog_queue_.pop_front(); 72 app_modal_dialog_queue_.pop_front();
71 if (dialog->IsValid()) 73 if (dialog->IsValid())
72 return dialog; 74 return dialog;
73 delete dialog; 75 delete dialog;
74 } 76 }
75 return NULL; 77 return NULL;
76 } 78 }
79
80 } // namespace app_modal
OLDNEW
« no previous file with comments | « components/app_modal/app_modal_dialog_queue.h ('k') | components/app_modal/javascript_app_modal_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698