summaryrefslogtreecommitdiffstats
path: root/chrome/browser/jsmessage_box_handler.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 16:58:03 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-06 16:58:03 +0000
commit6a02963e645852d8ce70b53aa6199ec1780f31c2 (patch)
tree7df60ab260a074368dbe29ad11f61344b218cac4 /chrome/browser/jsmessage_box_handler.h
parent690a99c80e4fe4e6eda9010b88e4438f57912336 (diff)
downloadchromium_src-6a02963e645852d8ce70b53aa6199ec1780f31c2.zip
chromium_src-6a02963e645852d8ce70b53aa6199ec1780f31c2.tar.gz
chromium_src-6a02963e645852d8ce70b53aa6199ec1780f31c2.tar.bz2
This is a redo of my previous notification registrar change. I saw a crash in handling NAV_ENTRY_COMMITTED, so am changing all consumers of this to use the registrar so that it is impossible to forget to unregister.
The difference is that in tab_contents I moved the removal code in RemoveInfoBar to only remove the listener if an infobar was actually removed. Review URL: http://codereview.chromium.org/16534 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7589 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/jsmessage_box_handler.h')
-rw-r--r--chrome/browser/jsmessage_box_handler.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/jsmessage_box_handler.h b/chrome/browser/jsmessage_box_handler.h
index 6873605..920d03d 100644
--- a/chrome/browser/jsmessage_box_handler.h
+++ b/chrome/browser/jsmessage_box_handler.h
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H__
-#define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H__
+#ifndef CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_
+#define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_
#include "chrome/common/ipc_message.h"
#include "chrome/views/app_modal_dialog_delegate.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_registrar.h"
class MessageBoxView;
class WebContents;
@@ -64,6 +65,8 @@ class JavascriptMessageBoxHandler
const NotificationSource& source,
const NotificationDetails& details);
+ NotificationRegistrar registrar_;
+
// The message box view whose commands we handle.
MessageBoxView* message_box_view_;
@@ -83,5 +86,4 @@ class JavascriptMessageBoxHandler
DISALLOW_EVIL_CONSTRUCTORS(JavascriptMessageBoxHandler);
};
-#endif // CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H__
-
+#endif // CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_