Index: chrome/browser/notifications/message_center_notification_manager.cc |
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc |
index b57ad7e6bcb19785f8c6b4e18bd3196e9b68b806..eb19cd688df158782d6c6dae6973d0cbf5ea0003 100644 |
--- a/chrome/browser/notifications/message_center_notification_manager.cc |
+++ b/chrome/browser/notifications/message_center_notification_manager.cc |
@@ -6,8 +6,6 @@ |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/prefs/pref_registry_simple.h" |
-#include "base/prefs/pref_service.h" |
#include "base/stl_util.h" |
#include "base/strings/stringprintf.h" |
#include "chrome/browser/extensions/api/notification_provider/notification_provider_api.h" |
@@ -21,7 +19,6 @@ |
#include "chrome/browser/notifications/screen_lock_notification_blocker.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/extensions/api/notification_provider.h" |
-#include "chrome/common/pref_names.h" |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/url_constants.h" |
#include "extensions/browser/extension_registry.h" |
@@ -43,34 +40,15 @@ |
#include "ash/system/web_notification/web_notification_tray.h" |
#endif |
-#if defined(OS_WIN) |
-// The first-run balloon will be shown |kFirstRunIdleDelaySeconds| after all |
-// popups go away and the user has notifications in the message center. |
-const int kFirstRunIdleDelaySeconds = 1; |
-#endif |
- |
MessageCenterNotificationManager::MessageCenterNotificationManager( |
message_center::MessageCenter* message_center, |
- PrefService* local_state, |
scoped_ptr<message_center::NotifierSettingsProvider> settings_provider) |
: message_center_(message_center), |
-#if defined(OS_WIN) |
- first_run_idle_timeout_( |
- base::TimeDelta::FromSeconds(kFirstRunIdleDelaySeconds)), |
-#endif |
settings_provider_(settings_provider.Pass()), |
system_observer_(this), |
stats_collector_(message_center), |
google_now_stats_collector_(message_center) |
-#if defined(OS_WIN) |
- , |
- weak_factory_(this) |
-#endif |
{ |
-#if defined(OS_WIN) |
- first_run_pref_.Init(prefs::kMessageCenterShowedFirstRunBalloon, local_state); |
-#endif |
- |
message_center_->AddObserver(this); |
message_center_->SetNotifierSettingsProvider(settings_provider_.get()); |
@@ -99,14 +77,6 @@ MessageCenterNotificationManager::~MessageCenterNotificationManager() { |
profile_notifications_.clear(); |
} |
-void MessageCenterNotificationManager::RegisterPrefs( |
- PrefRegistrySimple* registry) { |
- registry->RegisterBooleanPref(prefs::kMessageCenterShowedFirstRunBalloon, |
- false); |
- registry->RegisterBooleanPref(prefs::kMessageCenterShowIcon, true); |
- registry->RegisterBooleanPref(prefs::kMessageCenterForcedOnTaskbar, false); |
-} |
- |
//////////////////////////////////////////////////////////////////////////////// |
// NotificationUIManager |
@@ -305,29 +275,18 @@ void MessageCenterNotificationManager::OnNotificationRemoved( |
NotificationMap::const_iterator iter = profile_notifications_.find(id); |
if (iter != profile_notifications_.end()) |
RemoveProfileNotification(iter->second); |
- |
-#if defined(OS_WIN) |
- CheckFirstRunTimer(); |
-#endif |
} |
void MessageCenterNotificationManager::OnCenterVisibilityChanged( |
message_center::Visibility visibility) { |
-#if defined(OS_WIN) |
- if (visibility == message_center::VISIBILITY_TRANSIENT) |
- CheckFirstRunTimer(); |
-#endif |
} |
void MessageCenterNotificationManager::OnNotificationUpdated( |
const std::string& id) { |
-#if defined(OS_WIN) |
- CheckFirstRunTimer(); |
-#endif |
} |
void MessageCenterNotificationManager::EnsureMessageCenterClosed() { |
- if (tray_.get()) |
+ if (tray_.get() && tray_->GetMessageCenterTray()) |
tray_->GetMessageCenterTray()->HideMessageCenterBubble(); |
#if defined(USE_ASH) |