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

Unified Diff: chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h

Issue 7283022: Make a clean interface for dialog callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h
index be24a744112cdcbc7f56c038891ed7eb5a9f6dfd..585700230fe3888120ef2844930e352da32de33a 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_QUEUE_H_
#pragma once
-#include <queue>
+#include <deque>
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
@@ -56,6 +56,16 @@ class AppModalDialogQueue {
return active_dialog_;
}
+ // Iterators to walk the queue.
+ typedef std::deque<AppModalDialog*>::iterator iterator;
+ iterator begin() {
+ return app_modal_dialog_queue_.begin();
+ }
+
+ iterator end() {
+ return app_modal_dialog_queue_.end();
+ }
+
private:
friend struct DefaultSingletonTraits<AppModalDialogQueue>;
@@ -73,7 +83,7 @@ class AppModalDialogQueue {
// Contains all app modal dialogs which are waiting to be shown, with the
// currently modal dialog at the front of the queue.
- std::queue<AppModalDialog*> app_modal_dialog_queue_;
+ std::deque<AppModalDialog*> app_modal_dialog_queue_;
// The currently active app-modal dialog box's delegate. NULL if there is no
// active app-modal dialog box.
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc ('k') | chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698