Index: components/app_modal_dialogs/app_modal_dialog.h |
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h b/components/app_modal_dialogs/app_modal_dialog.h |
similarity index 84% |
rename from chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h |
rename to components/app_modal_dialogs/app_modal_dialog.h |
index 28cf5841f3c05e87d40a647b5ab15ba02bcea3c0..7ce2cd52162e1fd642875eea00c3f8b11f5ee4ac 100644 |
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h |
+++ b/components/app_modal_dialogs/app_modal_dialog.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_UI_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
-#define CHROME_BROWSER_UI_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
+#ifndef COMPONENTS_SYSTEM_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
+#define COMPONENTS_SYSTEM_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
#include <string> |
@@ -89,4 +89,17 @@ class AppModalDialog { |
DISALLOW_COPY_AND_ASSIGN(AppModalDialog); |
}; |
-#endif // CHROME_BROWSER_UI_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
+// An interface used to wait until the modal dialog gets shown. |
+class AppModalDialogWaiter { |
+ public: |
+ AppModalDialogWaiter(); |
+ virtual ~AppModalDialogWaiter(); |
+ |
+ // Wait until the modal dialog is shown and return the shown dialog. |
+ virtual AppModalDialog* Wait() = 0; |
+ |
+ // Called when the modal dialog is shown. |
+ virtual void Notify(AppModalDialog* dialog) = 0; |
+}; |
Avi (use Gerrit)
2014/10/21 20:10:48
Usually for something like this we'd have some kin
oshima
2014/10/21 21:39:45
It's a simplified observer. I can't add Add/Remove
|
+ |
+#endif // COMPONENTS_SYSTEM_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |