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

Unified Diff: chrome/browser/ui/cocoa/history_menu_bridge.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
« no previous file with comments | « chrome/browser/ui/cocoa/history_menu_bridge.h ('k') | chrome/browser/ui/cocoa/info_bubble_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/history_menu_bridge.mm
===================================================================
--- chrome/browser/ui/cocoa/history_menu_bridge.mm (revision 91968)
+++ chrome/browser/ui/cocoa/history_menu_bridge.mm (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
#import "chrome/browser/ui/cocoa/history_menu_cocoa_controller.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/common/notification_registrar.h"
#include "content/common/notification_service.h"
@@ -103,7 +104,7 @@
// The service is not ready for use yet, so become notified when it does.
if (!history_service_) {
registrar_.Add(
- this, NotificationType::HISTORY_LOADED, Source<Profile>(profile_));
+ this, chrome::NOTIFICATION_HISTORY_LOADED, Source<Profile>(profile_));
}
}
@@ -114,12 +115,13 @@
// Unregister ourselves as observers and notifications.
if (history_service_) {
const NotificationSource& src = NotificationService::AllSources();
- registrar_.Remove(this, NotificationType::HISTORY_TYPED_URLS_MODIFIED, src);
- registrar_.Remove(this, NotificationType::HISTORY_URL_VISITED, src);
- registrar_.Remove(this, NotificationType::HISTORY_URLS_DELETED, src);
+ registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
+ src);
+ registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_URL_VISITED, src);
+ registrar_.Remove(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, src);
} else {
registrar_.Remove(
- this, NotificationType::HISTORY_LOADED, Source<Profile>(profile_));
+ this, chrome::NOTIFICATION_HISTORY_LOADED, Source<Profile>(profile_));
}
if (tab_restore_service_)
@@ -134,12 +136,12 @@
}
}
-void HistoryMenuBridge::Observe(NotificationType type,
+void HistoryMenuBridge::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
// A history service is now ready. Check to see if it's the one for the main
// profile. If so, perform final initialization.
- if (type == NotificationType::HISTORY_LOADED) {
+ if (type == chrome::NOTIFICATION_HISTORY_LOADED) {
HistoryService* hs =
profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
if (hs != NULL && hs->BackendLoaded()) {
@@ -148,7 +150,7 @@
// Found our HistoryService, so stop listening for this notification.
registrar_.Remove(this,
- NotificationType::HISTORY_LOADED,
+ chrome::NOTIFICATION_HISTORY_LOADED,
Source<Profile>(profile_));
}
}
@@ -363,9 +365,10 @@
void HistoryMenuBridge::Init() {
const NotificationSource& source = NotificationService::AllSources();
- registrar_.Add(this, NotificationType::HISTORY_TYPED_URLS_MODIFIED, source);
- registrar_.Add(this, NotificationType::HISTORY_URL_VISITED, source);
- registrar_.Add(this, NotificationType::HISTORY_URLS_DELETED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_TYPED_URLS_MODIFIED,
+ source);
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URL_VISITED, source);
+ registrar_.Add(this, chrome::NOTIFICATION_HISTORY_URLS_DELETED, source);
}
void HistoryMenuBridge::CreateMenu() {
« no previous file with comments | « chrome/browser/ui/cocoa/history_menu_bridge.h ('k') | chrome/browser/ui/cocoa/info_bubble_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698