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

Unified Diff: chrome/browser/notifications/message_center_notification_manager.cc

Issue 1334363002: [Eraser] First pass at removing the notification center panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar fix Created 5 years, 3 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/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..77b20e55cd66c630a779e5b946dcd5157c1edfe2 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
@@ -306,24 +276,14 @@ void MessageCenterNotificationManager::OnNotificationRemoved(
if (iter != profile_notifications_.end())
RemoveProfileNotification(iter->second);
Robert Sesek 2015/09/15 22:07:08 nit: remove extra blank line
dewittj 2015/09/15 22:52:22 Done.
-#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() {

Powered by Google App Engine
This is Rietveld 408576698