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

Side by Side Diff: chrome/browser/notifications/message_center_notification_manager.cc

Issue 252513004: Reland r265807: "Moves the notification icon out of th..." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable tray size test on Vista since it won't have any effect on a new icon. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/message_center_notification_manager.h" 5 #include "chrome/browser/notifications/message_center_notification_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 MessageCenterNotificationManager::~MessageCenterNotificationManager() { 90 MessageCenterNotificationManager::~MessageCenterNotificationManager() {
91 message_center_->RemoveObserver(this); 91 message_center_->RemoveObserver(this);
92 } 92 }
93 93
94 void MessageCenterNotificationManager::RegisterPrefs( 94 void MessageCenterNotificationManager::RegisterPrefs(
95 PrefRegistrySimple* registry) { 95 PrefRegistrySimple* registry) {
96 registry->RegisterBooleanPref(prefs::kMessageCenterShowedFirstRunBalloon, 96 registry->RegisterBooleanPref(prefs::kMessageCenterShowedFirstRunBalloon,
97 false); 97 false);
98 registry->RegisterBooleanPref(prefs::kMessageCenterShowIcon, true); 98 registry->RegisterBooleanPref(prefs::kMessageCenterShowIcon, true);
99 registry->RegisterBooleanPref(prefs::kMessageCenterForcedOnTaskbar, false);
99 } 100 }
100 101
101 //////////////////////////////////////////////////////////////////////////////// 102 ////////////////////////////////////////////////////////////////////////////////
102 // NotificationUIManager 103 // NotificationUIManager
103 104
104 void MessageCenterNotificationManager::Add(const Notification& notification, 105 void MessageCenterNotificationManager::Add(const Notification& notification,
105 Profile* profile) { 106 Profile* profile) {
106 if (Update(notification, profile)) 107 if (Update(notification, profile))
107 return; 108 return;
108 109
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 492
492 MessageCenterNotificationManager::ProfileNotification* 493 MessageCenterNotificationManager::ProfileNotification*
493 MessageCenterNotificationManager::FindProfileNotification( 494 MessageCenterNotificationManager::FindProfileNotification(
494 const std::string& id) const { 495 const std::string& id) const {
495 NotificationMap::const_iterator iter = profile_notifications_.find(id); 496 NotificationMap::const_iterator iter = profile_notifications_.find(id);
496 if (iter == profile_notifications_.end()) 497 if (iter == profile_notifications_.end())
497 return NULL; 498 return NULL;
498 499
499 return (*iter).second; 500 return (*iter).second;
500 } 501 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/status_icons/status_icon.h » ('j') | chrome/browser/ui/views/status_icons/status_tray_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698