| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_H_ | 5 #ifndef COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_H_ |
| 6 #define COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_H_ | 6 #define COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Returns true if the dialog is still valid. As dialogs are created they are | 48 // Returns true if the dialog is still valid. As dialogs are created they are |
| 49 // added to the AppModalDialogQueue. When the current modal dialog finishes | 49 // added to the AppModalDialogQueue. When the current modal dialog finishes |
| 50 // and it's time to show the next dialog in the queue IsValid is invoked. | 50 // and it's time to show the next dialog in the queue IsValid is invoked. |
| 51 // If IsValid returns false the dialog is deleted and not shown. | 51 // If IsValid returns false the dialog is deleted and not shown. |
| 52 bool IsValid(); | 52 bool IsValid(); |
| 53 | 53 |
| 54 // Methods overridable by AppModalDialog subclasses: | 54 // Methods overridable by AppModalDialog subclasses: |
| 55 | 55 |
| 56 // Invalidates the dialog, therefore causing it to not be shown when its turn | 56 // Invalidates the dialog, therefore causing it to not be shown when its turn |
| 57 // to be shown comes around. | 57 // to be shown comes around. |
| 58 virtual void Invalidate(); | 58 virtual void Invalidate(bool suppress_callbacks); |
| 59 | 59 |
| 60 // Used only for testing. Returns whether the dialog is a JavaScript modal | 60 // Used only for testing. Returns whether the dialog is a JavaScript modal |
| 61 // dialog. | 61 // dialog. |
| 62 virtual bool IsJavaScriptModalDialog(); | 62 virtual bool IsJavaScriptModalDialog(); |
| 63 | 63 |
| 64 protected: | 64 protected: |
| 65 // Overridden by subclasses to create the feature-specific native dialog box. | 65 // Overridden by subclasses to create the feature-specific native dialog box. |
| 66 virtual NativeAppModalDialog* CreateNativeDialog() = 0; | 66 virtual NativeAppModalDialog* CreateNativeDialog() = 0; |
| 67 | 67 |
| 68 private: | 68 private: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 93 // Called when the modal dialog is shown. | 93 // Called when the modal dialog is shown. |
| 94 virtual void Notify(AppModalDialog* dialog) = 0; | 94 virtual void Notify(AppModalDialog* dialog) = 0; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 DISALLOW_COPY_AND_ASSIGN(AppModalDialogObserver); | 97 DISALLOW_COPY_AND_ASSIGN(AppModalDialogObserver); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace app_modal | 100 } // namespace app_modal |
| 101 | 101 |
| 102 #endif // COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_H_ | 102 #endif // COMPONENTS_APP_MODAL_APP_MODAL_DIALOG_H_ |
| OLD | NEW |