Chromium Code Reviews| Index: chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h |
| diff --git a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h |
| index 6a05b8e5656c7c4b88c3f4fef0ca846253943ec6..4ae6d18da792a40e490e4bf831dea5667da816cc 100644 |
| --- a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h |
| +++ b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h |
| @@ -8,16 +8,15 @@ |
| #include <string> |
| +#include "base/compiler_specific.h" |
| #include "base/time.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" |
| #include "content/browser/javascript_dialogs.h" |
| -#include "content/common/notification_observer.h" |
| -#include "content/common/notification_registrar.h" |
| -class ExtensionHost; |
| -class NativeAppModalDialog; |
| -class TabContents; |
| +namespace content { |
| +class JavaScriptDialogDelegate; |
| +} |
| namespace IPC { |
| class Message; |
| @@ -37,8 +36,7 @@ class ChromeJavaScriptDialogExtraData { |
| // A controller + model class for JavaScript alert, confirm, prompt, and |
| // onbeforeunload dialog boxes. |
| -class JavaScriptAppModalDialog : public AppModalDialog, |
| - public NotificationObserver { |
| +class JavaScriptAppModalDialog : public AppModalDialog { |
| public: |
| JavaScriptAppModalDialog(content::JavaScriptDialogDelegate* delegate, |
| ChromeJavaScriptDialogExtraData* extra_data, |
| @@ -52,10 +50,10 @@ class JavaScriptAppModalDialog : public AppModalDialog, |
| virtual ~JavaScriptAppModalDialog(); |
| // Overridden from AppModalDialog: |
| - virtual NativeAppModalDialog* CreateNativeDialog(); |
| - virtual bool IsJavaScriptModalDialog(); |
| - |
| - content::JavaScriptDialogDelegate* delegate() const { return delegate_; } |
| + virtual NativeAppModalDialog* CreateNativeDialog() OVERRIDE; |
| + virtual bool IsJavaScriptModalDialog() OVERRIDE; |
| + virtual void Invalidate() OVERRIDE; |
| + virtual content::JavaScriptDialogDelegate* delegate() const OVERRIDE; |
| // Callbacks from NativeDialog when the user accepts or cancels the dialog. |
| void OnCancel(bool suppress_js_messages); |
| @@ -77,20 +75,10 @@ class JavaScriptAppModalDialog : public AppModalDialog, |
| bool is_before_unload_dialog() const { return is_before_unload_dialog_; } |
| private: |
| - // Overridden from NotificationObserver: |
| - virtual void Observe(NotificationType type, |
| - const NotificationSource& source, |
| - const NotificationDetails& details); |
| - |
| - // Initializes for notifications to listen. |
| - void InitNotifications(); |
| - |
| // Notifies the delegate with the result of the dialog. |
| void NotifyDelegate(bool success, const string16& prompt_text, |
| bool suppress_js_messages); |
| - NotificationRegistrar registrar_; |
| - |
| // An implementation of the client interface to provide supporting methods |
| // and receive results. |
| content::JavaScriptDialogDelegate* delegate_; |
|
Evan Martin
2011/06/29 22:01:52
This is confusing; AppModalDialog already has a pr
Avi (use Gerrit)
2011/06/29 22:09:29
Right, but this as a subclass requires the expande
Evan Martin
2011/06/29 22:53:09
I polled my office and they came up with:
content
Avi (use Gerrit)
2011/06/29 23:19:48
You were objecting to the storage rather than the
|