Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(515)

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
===================================================================
--- chrome/browser/ui/cocoa/browser_window_cocoa.mm (revision 91968)
+++ chrome/browser/ui/cocoa/browser_window_cocoa.mm (working copy)
@@ -35,6 +35,7 @@
#import "chrome/browser/ui/cocoa/theme_install_bubble_view.h"
#import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/native_web_keyboard_event.h"
@@ -51,9 +52,10 @@
controller_(controller),
confirm_close_factory_(browser) {
// This pref applies to all windows, so all must watch for it.
- registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::SIDEBAR_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_SIDEBAR_CHANGED,
NotificationService::AllSources());
}
@@ -583,16 +585,16 @@
return NEW_POPUP;
}
-void BrowserWindowCocoa::Observe(NotificationType type,
+void BrowserWindowCocoa::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
+ switch (type) {
// Only the key window gets a direct toggle from the menu.
// Other windows hear about it from the notification.
- case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
+ case chrome::NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
[controller_ updateBookmarkBarVisibilityWithAnimation:YES];
break;
- case NotificationType::SIDEBAR_CHANGED:
+ case chrome::NOTIFICATION_SIDEBAR_CHANGED:
UpdateSidebarForContents(
Details<SidebarContainer>(details)->tab_contents());
break;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698