| 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_DIALOGS_APP_MODAL_DIALOG_H_ | 5 #ifndef COMPONENTS_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
| 6 #define COMPONENTS_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ | 6 #define COMPONENTS_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 | 13 |
| 14 class NativeAppModalDialog; | |
| 15 | |
| 16 namespace content { | 14 namespace content { |
| 17 class WebContents; | 15 class WebContents; |
| 18 } | 16 } |
| 19 | 17 |
| 18 namespace app_modal_dialogs { |
| 19 class NativeAppModalDialog; |
| 20 |
| 20 // A controller+model base class for modal dialogs. | 21 // A controller+model base class for modal dialogs. |
| 21 class AppModalDialog { | 22 class AppModalDialog { |
| 22 public: | 23 public: |
| 23 // A union of data necessary to determine the type of message box to | 24 // A union of data necessary to determine the type of message box to |
| 24 // show. | 25 // show. |
| 25 AppModalDialog(content::WebContents* web_contents, | 26 AppModalDialog(content::WebContents* web_contents, |
| 26 const base::string16& title); | 27 const base::string16& title); |
| 27 virtual ~AppModalDialog(); | 28 virtual ~AppModalDialog(); |
| 28 | 29 |
| 29 // Called by the AppModalDialogQueue to show this dialog. | 30 // Called by the AppModalDialogQueue to show this dialog. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 AppModalDialogObserver(); | 96 AppModalDialogObserver(); |
| 96 virtual ~AppModalDialogObserver(); | 97 virtual ~AppModalDialogObserver(); |
| 97 | 98 |
| 98 // Called when the modal dialog is shown. | 99 // Called when the modal dialog is shown. |
| 99 virtual void Notify(AppModalDialog* dialog) = 0; | 100 virtual void Notify(AppModalDialog* dialog) = 0; |
| 100 | 101 |
| 101 private: | 102 private: |
| 102 DISALLOW_COPY_AND_ASSIGN(AppModalDialogObserver); | 103 DISALLOW_COPY_AND_ASSIGN(AppModalDialogObserver); |
| 103 }; | 104 }; |
| 104 | 105 |
| 106 } // namespace app_modal_dialogs |
| 107 |
| 105 #endif // COMPONENTS_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ | 108 #endif // COMPONENTS_APP_MODAL_DIALOGS_APP_MODAL_DIALOG_H_ |
| OLD | NEW |