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

Unified Diff: chrome/browser/tabs/pinned_tab_service.cc

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/tabs/pinned_tab_service.h ('k') | chrome/browser/tabs/tab_finder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/pinned_tab_service.cc
===================================================================
--- chrome/browser/tabs/pinned_tab_service.cc (revision 91968)
+++ chrome/browser/tabs/pinned_tab_service.cc (working copy)
@@ -8,8 +8,8 @@
#include "chrome/browser/tabs/pinned_tab_codec.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
static bool IsLastNormalBrowser(Browser* browser) {
for (BrowserList::const_iterator i = BrowserList::begin();
@@ -26,22 +26,22 @@
: profile_(profile),
got_exiting_(false),
has_normal_browser_(false) {
- registrar_.Add(this, NotificationType::BROWSER_OPENED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::BROWSER_CLOSING,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::APP_EXITING,
+ registrar_.Add(this, content::NOTIFICATION_APP_EXITING,
NotificationService::AllSources());
}
-void PinnedTabService::Observe(NotificationType type,
+void PinnedTabService::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
if (got_exiting_)
return;
- switch (type.value) {
- case NotificationType::BROWSER_OPENED: {
+ switch (type) {
+ case chrome::NOTIFICATION_BROWSER_OPENED: {
Browser* browser = Source<Browser>(source).ptr();
if (!has_normal_browser_ && browser->is_type_tabbed() &&
browser->profile() == profile_) {
@@ -50,7 +50,7 @@
break;
}
- case NotificationType::BROWSER_CLOSING: {
+ case chrome::NOTIFICATION_BROWSER_CLOSING: {
Browser* browser = Source<Browser>(source).ptr();
if (has_normal_browser_ && browser->profile() == profile_) {
if (*(Details<bool>(details)).ptr()) {
@@ -63,7 +63,7 @@
break;
}
- case NotificationType::APP_EXITING: {
+ case content::NOTIFICATION_APP_EXITING: {
if (has_normal_browser_)
GotExit();
break;
« no previous file with comments | « chrome/browser/tabs/pinned_tab_service.h ('k') | chrome/browser/tabs/tab_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698