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

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

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 #ifndef COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_QUEUE_H_ 5 #ifndef COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_QUEUE_H_
6 #define COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_QUEUE_H_ 6 #define COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 template <typename T> struct DefaultSingletonTraits;
13
14 namespace app_modal {
15
12 class AppModalDialog; 16 class AppModalDialog;
13 17
14 template <typename T> struct DefaultSingletonTraits;
15
16 // Keeps a queue of AppModalDialogs, making sure only one app modal 18 // Keeps a queue of AppModalDialogs, making sure only one app modal
17 // dialog is shown at a time. 19 // dialog is shown at a time.
18 // This class is a singleton. 20 // This class is a singleton.
19 class AppModalDialogQueue { 21 class AppModalDialogQueue {
20 public: 22 public:
21 typedef std::deque<AppModalDialog*>::iterator iterator; 23 typedef std::deque<AppModalDialog*>::iterator iterator;
22 24
23 // Returns the singleton instance. 25 // Returns the singleton instance.
24 static AppModalDialogQueue* GetInstance(); 26 static AppModalDialogQueue* GetInstance();
25 27
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // active app-modal dialog box. 81 // active app-modal dialog box.
80 AppModalDialog* active_dialog_; 82 AppModalDialog* active_dialog_;
81 83
82 // Stores if |ShowModalDialog()| is currently being called on an app-modal 84 // Stores if |ShowModalDialog()| is currently being called on an app-modal
83 // dialog. 85 // dialog.
84 bool showing_modal_dialog_; 86 bool showing_modal_dialog_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(AppModalDialogQueue); 88 DISALLOW_COPY_AND_ASSIGN(AppModalDialogQueue);
87 }; 89 };
88 90
91 } // namespace app_modal
92
89 #endif // COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_QUEUE_H_ 93 #endif // COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_QUEUE_H_
OLDNEW
« no previous file with comments | « components/app_modal/app_modal_dialog.cc ('k') | components/app_modal/app_modal_dialog_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698