diff options
-rw-r--r-- | chrome/browser/extensions/extension_crash_recovery_browsertest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_options_menu_model.cc | 20 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_prefs_manager.cc | 14 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_prefs_manager.h | 38 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_ui_manager.h | 104 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_ui_manager_impl.cc (renamed from chrome/browser/notifications/notification_ui_manager.cc) | 56 | ||||
-rw-r--r-- | chrome/browser/notifications/notification_ui_manager_impl.h | 104 | ||||
-rw-r--r-- | chrome/browser/prefs/browser_prefs.cc | 4 | ||||
-rw-r--r-- | chrome/browser/task_manager/task_manager_notification_resource_provider.cc | 1 | ||||
-rw-r--r-- | chrome/browser/ui/panels/panel_browsertest.cc | 1 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 5 |
11 files changed, 229 insertions, 120 deletions
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc index 48b52df..42cbc45 100644 --- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc +++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc @@ -8,6 +8,8 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/extensions/extension_service.h" +#include "chrome/browser/notifications/balloon.h" +#include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/balloon_host.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_delegate.h" diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc index c486742..fc96287 100644 --- a/chrome/browser/notifications/notification_options_menu_model.cc +++ b/chrome/browser/notifications/notification_options_menu_model.cc @@ -15,6 +15,7 @@ #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/notifications/notification.h" +#include "chrome/browser/notifications/notification_prefs_manager.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser_list.h" @@ -64,8 +65,10 @@ CornerSelectionMenuModel::~CornerSelectionMenuModel() { } bool CornerSelectionMenuModel::IsCommandIdChecked(int command_id) const { - NotificationUIManager* ui = g_browser_process->notification_ui_manager(); - BalloonCollection::PositionPreference current = ui->GetPositionPreference(); + NotificationPrefsManager* prefs = + g_browser_process->notification_ui_manager()->prefs_manager(); + BalloonCollection::PositionPreference current = + prefs->GetPositionPreference(); if (command_id == kCornerUpperLeft) return (current == BalloonCollection::UPPER_LEFT); @@ -94,18 +97,19 @@ bool CornerSelectionMenuModel::GetAcceleratorForCommandId( } void CornerSelectionMenuModel::ExecuteCommand(int command_id) { - NotificationUIManager* ui = g_browser_process->notification_ui_manager(); + NotificationPrefsManager* prefs = + g_browser_process->notification_ui_manager()->prefs_manager(); if (command_id == kCornerUpperLeft) - ui->SetPositionPreference(BalloonCollection::UPPER_LEFT); + prefs->SetPositionPreference(BalloonCollection::UPPER_LEFT); else if (command_id == kCornerUpperRight) - ui->SetPositionPreference(BalloonCollection::UPPER_RIGHT); + prefs->SetPositionPreference(BalloonCollection::UPPER_RIGHT); else if (command_id == kCornerLowerLeft) - ui->SetPositionPreference(BalloonCollection::LOWER_LEFT); + prefs->SetPositionPreference(BalloonCollection::LOWER_LEFT); else if (command_id == kCornerLowerRight) - ui->SetPositionPreference(BalloonCollection::LOWER_RIGHT); + prefs->SetPositionPreference(BalloonCollection::LOWER_RIGHT); else if (command_id == kCornerDefault) - ui->SetPositionPreference(BalloonCollection::DEFAULT_POSITION); + prefs->SetPositionPreference(BalloonCollection::DEFAULT_POSITION); else NOTREACHED(); } diff --git a/chrome/browser/notifications/notification_prefs_manager.cc b/chrome/browser/notifications/notification_prefs_manager.cc new file mode 100644 index 0000000..03e118e --- /dev/null +++ b/chrome/browser/notifications/notification_prefs_manager.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/notifications/notification_prefs_manager.h" + +#include "chrome/browser/prefs/pref_service.h" +#include "chrome/common/pref_names.h" + +// static +void NotificationPrefsManager::RegisterPrefs(PrefService* prefs) { + prefs->RegisterIntegerPref(prefs::kDesktopNotificationPosition, + BalloonCollection::DEFAULT_POSITION); +} diff --git a/chrome/browser/notifications/notification_prefs_manager.h b/chrome/browser/notifications/notification_prefs_manager.h new file mode 100644 index 0000000..03cb716 --- /dev/null +++ b/chrome/browser/notifications/notification_prefs_manager.h @@ -0,0 +1,38 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ +#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ +#pragma once + +#include "chrome/browser/notifications/balloon_collection.h" + +class PrefService; + +// This interface is used to access and mutate the preferences related to +// desktop notifications. +class NotificationPrefsManager { + public: + virtual ~NotificationPrefsManager() {} + + // Registers preferences. + static void RegisterPrefs(PrefService* prefs); + + // Gets the preference indicating where notifications should be placed. + virtual BalloonCollection::PositionPreference + GetPositionPreference() const = 0; + + // Sets the preference that indicates where notifications should + // be placed on the screen. + virtual void SetPositionPreference( + BalloonCollection::PositionPreference preference) = 0; + + protected: + NotificationPrefsManager() {} + + private: + DISALLOW_COPY_AND_ASSIGN(NotificationPrefsManager); +}; + +#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ diff --git a/chrome/browser/notifications/notification_ui_manager.h b/chrome/browser/notifications/notification_ui_manager.h index 9040595..9242477 100644 --- a/chrome/browser/notifications/notification_ui_manager.h +++ b/chrome/browser/notifications/notification_ui_manager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,31 +6,20 @@ #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ #pragma once -#include <deque> #include <string> #include <vector> -#include "base/id_map.h" -#include "base/memory/scoped_ptr.h" -#include "base/timer.h" -#include "chrome/browser/notifications/balloon.h" -#include "chrome/browser/notifications/balloon_collection.h" -#include "chrome/browser/prefs/pref_member.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" - +class BalloonCollection; +class GURL; class Notification; +class NotificationPrefsManager; class PrefService; -class Profile; -class QueuedNotification; - -// The notification manager manages use of the desktop for notifications. -// It maintains a queue of pending notifications when space becomes constrained. -class NotificationUIManager - : public BalloonCollection::BalloonSpaceChangeListener, - public content::NotificationObserver { + +// This virtual interface is used to manage the UI surfaces for desktop +// notifications. There is one instance per profile. +class NotificationUIManager { public: - virtual ~NotificationUIManager(); + virtual ~NotificationUIManager() {} // Creates an initialized UI manager with a new balloon collection // and the listener relationship setup. @@ -43,89 +32,38 @@ class NotificationUIManager static NotificationUIManager* Create(PrefService* local_state, BalloonCollection* balloons); - // Registers preferences. - static void RegisterPrefs(PrefService* prefs); - - // Initializes the UI manager with a balloon collection; this object - // takes ownership of the balloon collection. - void Initialize(BalloonCollection* balloon_collection); - // Adds a notification to be displayed. Virtual for unit test override. virtual void Add(const Notification& notification, - Profile* profile); + Profile* profile) = 0; // Removes any notifications matching the supplied ID, either currently // displayed or in the queue. Returns true if anything was removed. - virtual bool CancelById(const std::string& notification_id); + virtual bool CancelById(const std::string& notification_id) = 0; // Removes any notifications matching the supplied source origin // (which could be an extension ID), either currently displayed or in the // queue. Returns true if anything was removed. - virtual bool CancelAllBySourceOrigin(const GURL& source_origin); + virtual bool CancelAllBySourceOrigin(const GURL& source_origin) = 0; // Cancels all pending notifications and closes anything currently showing. // Used when the app is terminating. - void CancelAll(); + virtual void CancelAll() = 0; // Returns balloon collection. - BalloonCollection* balloon_collection() { - return balloon_collection_.get(); - } - - // Gets the preference indicating where notifications should be placed. - BalloonCollection::PositionPreference GetPositionPreference(); + virtual BalloonCollection* balloon_collection() = 0; - // Sets the preference that indicates where notifications should - // be placed on the screen. - void SetPositionPreference(BalloonCollection::PositionPreference preference); + // Returns the impl, for use primarily by testing. + virtual NotificationPrefsManager* prefs_manager() = 0; // Retrieves an ordered list of all queued notifications. // Used only for automation/testing. - void GetQueuedNotificationsForTesting( - std::vector<const Notification*>* notifications); - - private: - explicit NotificationUIManager(PrefService* local_state); - - // content::NotificationObserver override. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; - - // Attempts to display notifications from the show_queue if the user - // is active. - void CheckAndShowNotifications(); + virtual void GetQueuedNotificationsForTesting( + std::vector<const Notification*>* notifications) {} - // Attempts to display notifications from the show_queue. - void ShowNotifications(); - - // BalloonCollectionObserver implementation. - virtual void OnBalloonSpaceChanged() OVERRIDE; - - // Replace an existing notification with this one if applicable; - // returns true if the replacement happened. - bool TryReplacement(const Notification& notification); - - // Checks the user state to decide if we want to show the notification. - void CheckUserState(); - - // An owned pointer to the collection of active balloons. - scoped_ptr<BalloonCollection> balloon_collection_; - - // A queue of notifications which are waiting to be shown. - typedef std::deque<QueuedNotification*> NotificationDeque; - NotificationDeque show_queue_; - - // Registrar for the other kind of notifications (event signaling). - content::NotificationRegistrar registrar_; - - // Prefs listener for the position preference. - IntegerPrefMember position_pref_; - - // Used by screen-saver and full-screen handling support. - bool is_user_active_; - base::RepeatingTimer<NotificationUIManager> user_state_check_timer_; + protected: + NotificationUIManager() {} + private: DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); }; diff --git a/chrome/browser/notifications/notification_ui_manager.cc b/chrome/browser/notifications/notification_ui_manager_impl.cc index 7a4ae4d..cdecd85 100644 --- a/chrome/browser/notifications/notification_ui_manager.cc +++ b/chrome/browser/notifications/notification_ui_manager_impl.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/notifications/notification_ui_manager.h" +#include "chrome/browser/notifications/notification_ui_manager_impl.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" @@ -46,7 +46,7 @@ class QueuedNotification { DISALLOW_COPY_AND_ASSIGN(QueuedNotification); }; -NotificationUIManager::NotificationUIManager(PrefService* local_state) +NotificationUIManagerImpl::NotificationUIManagerImpl(PrefService* local_state) : balloon_collection_(NULL), is_user_active_(true) { registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING, @@ -57,7 +57,7 @@ NotificationUIManager::NotificationUIManager(PrefService* local_state) #endif } -NotificationUIManager::~NotificationUIManager() { +NotificationUIManagerImpl::~NotificationUIManagerImpl() { STLDeleteElements(&show_queue_); #if defined(OS_MACOSX) StopFullScreenMonitor(); @@ -73,19 +73,14 @@ NotificationUIManager* NotificationUIManager::Create(PrefService* local_state) { NotificationUIManager* NotificationUIManager::Create( PrefService* local_state, BalloonCollection* balloons) { - NotificationUIManager* instance = new NotificationUIManager(local_state); + NotificationUIManagerImpl* instance = + new NotificationUIManagerImpl(local_state); instance->Initialize(balloons); balloons->set_space_change_listener(instance); return instance; } -// static -void NotificationUIManager::RegisterPrefs(PrefService* prefs) { - prefs->RegisterIntegerPref(prefs::kDesktopNotificationPosition, - BalloonCollection::DEFAULT_POSITION); -} - -void NotificationUIManager::Initialize( +void NotificationUIManagerImpl::Initialize( BalloonCollection* balloon_collection) { DCHECK(!balloon_collection_.get()); DCHECK(balloon_collection); @@ -95,7 +90,7 @@ void NotificationUIManager::Initialize( position_pref_.GetValue())); } -void NotificationUIManager::Add(const Notification& notification, +void NotificationUIManagerImpl::Add(const Notification& notification, Profile* profile) { if (TryReplacement(notification)) { return; @@ -108,7 +103,7 @@ void NotificationUIManager::Add(const Notification& notification, CheckAndShowNotifications(); } -bool NotificationUIManager::CancelById(const std::string& id) { +bool NotificationUIManagerImpl::CancelById(const std::string& id) { // See if this ID hasn't been shown yet. NotificationDeque::iterator iter; for (iter = show_queue_.begin(); iter != show_queue_.end(); ++iter) { @@ -121,7 +116,7 @@ bool NotificationUIManager::CancelById(const std::string& id) { return balloon_collection_->RemoveById(id); } -bool NotificationUIManager::CancelAllBySourceOrigin(const GURL& source) { +bool NotificationUIManagerImpl::CancelAllBySourceOrigin(const GURL& source) { // Same pattern as CancelById, but more complicated than the above // because there may be multiple notifications from the same source. bool removed = false; @@ -138,18 +133,26 @@ bool NotificationUIManager::CancelAllBySourceOrigin(const GURL& source) { return balloon_collection_->RemoveBySourceOrigin(source) || removed; } -void NotificationUIManager::CancelAll() { +void NotificationUIManagerImpl::CancelAll() { STLDeleteElements(&show_queue_); balloon_collection_->RemoveAll(); } -void NotificationUIManager::CheckAndShowNotifications() { +BalloonCollection* NotificationUIManagerImpl::balloon_collection() { + return balloon_collection_.get(); +} + +NotificationPrefsManager* NotificationUIManagerImpl::prefs_manager() { + return this; +} + +void NotificationUIManagerImpl::CheckAndShowNotifications() { CheckUserState(); if (is_user_active_) ShowNotifications(); } -void NotificationUIManager::CheckUserState() { +void NotificationUIManagerImpl::CheckUserState() { bool is_user_active_previously = is_user_active_; is_user_active_ = !CheckIdleStateIsLocked() && !IsFullScreenMode(); if (is_user_active_ == is_user_active_previously) @@ -164,11 +167,11 @@ void NotificationUIManager::CheckUserState() { // Start a timer to detect the moment at which the user becomes active. user_state_check_timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(kUserStatePollingIntervalSeconds), this, - &NotificationUIManager::CheckUserState); + &NotificationUIManagerImpl::CheckUserState); } } -void NotificationUIManager::ShowNotifications() { +void NotificationUIManagerImpl::ShowNotifications() { while (!show_queue_.empty() && balloon_collection_->HasSpace()) { scoped_ptr<QueuedNotification> queued_notification(show_queue_.front()); show_queue_.pop_front(); @@ -177,11 +180,12 @@ void NotificationUIManager::ShowNotifications() { } } -void NotificationUIManager::OnBalloonSpaceChanged() { +void NotificationUIManagerImpl::OnBalloonSpaceChanged() { CheckAndShowNotifications(); } -bool NotificationUIManager::TryReplacement(const Notification& notification) { +bool NotificationUIManagerImpl::TryReplacement( + const Notification& notification) { const GURL& origin = notification.origin_url(); const string16& replace_id = notification.replace_id(); @@ -216,21 +220,21 @@ bool NotificationUIManager::TryReplacement(const Notification& notification) { } BalloonCollection::PositionPreference -NotificationUIManager::GetPositionPreference() { +NotificationUIManagerImpl::GetPositionPreference() const { LOG(INFO) << "Current position preference: " << position_pref_.GetValue(); return static_cast<BalloonCollection::PositionPreference>( position_pref_.GetValue()); } -void NotificationUIManager::SetPositionPreference( +void NotificationUIManagerImpl::SetPositionPreference( BalloonCollection::PositionPreference preference) { LOG(INFO) << "Setting position preference: " << preference; position_pref_.SetValue(static_cast<int>(preference)); balloon_collection_->SetPositionPreference(preference); } -void NotificationUIManager::GetQueuedNotificationsForTesting( +void NotificationUIManagerImpl::GetQueuedNotificationsForTesting( std::vector<const Notification*>* notifications) { NotificationDeque::const_iterator queued_iter; for (queued_iter = show_queue_.begin(); queued_iter != show_queue_.end(); @@ -239,7 +243,7 @@ void NotificationUIManager::GetQueuedNotificationsForTesting( } } -void NotificationUIManager::Observe( +void NotificationUIManagerImpl::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { diff --git a/chrome/browser/notifications/notification_ui_manager_impl.h b/chrome/browser/notifications/notification_ui_manager_impl.h new file mode 100644 index 0000000..e8e79a0 --- /dev/null +++ b/chrome/browser/notifications/notification_ui_manager_impl.h @@ -0,0 +1,104 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ +#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ +#pragma once + +#include <deque> +#include <string> +#include <vector> + +#include "base/id_map.h" +#include "base/memory/scoped_ptr.h" +#include "base/timer.h" +#include "chrome/browser/notifications/balloon.h" +#include "chrome/browser/notifications/balloon_collection.h" +#include "chrome/browser/notifications/notification_prefs_manager.h" +#include "chrome/browser/notifications/notification_ui_manager.h" +#include "chrome/browser/prefs/pref_member.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" + +class Notification; +class PrefService; +class Profile; +class QueuedNotification; + +// The notification manager manages use of the desktop for notifications. +// It maintains a queue of pending notifications when space becomes constrained. +class NotificationUIManagerImpl + : public NotificationUIManager, + public NotificationPrefsManager, + public BalloonCollection::BalloonSpaceChangeListener, + public content::NotificationObserver { + public: + explicit NotificationUIManagerImpl(PrefService* local_state); + virtual ~NotificationUIManagerImpl(); + + // Initializes the UI manager with a balloon collection; this object + // takes ownership of the balloon collection. + void Initialize(BalloonCollection* balloon_collection); + + // NotificationUIManager: + virtual void Add(const Notification& notification, + Profile* profile) OVERRIDE; + virtual bool CancelById(const std::string& notification_id) OVERRIDE; + virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE; + virtual void CancelAll() OVERRIDE; + virtual BalloonCollection* balloon_collection() OVERRIDE; + virtual NotificationPrefsManager* prefs_manager() OVERRIDE; + virtual void GetQueuedNotificationsForTesting( + std::vector<const Notification*>* notifications) OVERRIDE; + + // NotificationPrefsManager: + virtual BalloonCollection::PositionPreference + GetPositionPreference() const OVERRIDE; + virtual void SetPositionPreference( + BalloonCollection::PositionPreference preference) OVERRIDE; + + private: + // content::NotificationObserver override. + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; + + // Attempts to display notifications from the show_queue if the user + // is active. + void CheckAndShowNotifications(); + + // Attempts to display notifications from the show_queue. + void ShowNotifications(); + + // BalloonCollectionObserver implementation. + virtual void OnBalloonSpaceChanged() OVERRIDE; + + // Replace an existing notification with this one if applicable; + // returns true if the replacement happened. + bool TryReplacement(const Notification& notification); + + // Checks the user state to decide if we want to show the notification. + void CheckUserState(); + + // An owned pointer to the collection of active balloons. + scoped_ptr<BalloonCollection> balloon_collection_; + + // A queue of notifications which are waiting to be shown. + typedef std::deque<QueuedNotification*> NotificationDeque; + NotificationDeque show_queue_; + + // Registrar for the other kind of notifications (event signaling). + content::NotificationRegistrar registrar_; + + // Prefs listener for the position preference. + IntegerPrefMember position_pref_; + + // Used by screen-saver and full-screen handling support. + bool is_user_active_; + base::RepeatingTimer<NotificationUIManagerImpl> user_state_check_timer_; + + DISALLOW_COPY_AND_ASSIGN(NotificationUIManagerImpl); +}; + +#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_IMPL_H_ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 3a885de..5971787 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -32,7 +32,7 @@ #include "chrome/browser/net/predictor.h" #include "chrome/browser/net/ssl_config_service_manager.h" #include "chrome/browser/notifications/desktop_notification_service.h" -#include "chrome/browser/notifications/notification_ui_manager.h" +#include "chrome/browser/notifications/notification_prefs_manager.h" #include "chrome/browser/page_info_model.h" #include "chrome/browser/password_manager/password_manager.h" #include "chrome/browser/policy/cloud_policy_subsystem.h" @@ -131,7 +131,7 @@ void RegisterLocalState(PrefService* local_state) { #endif #if defined(ENABLE_NOTIFICATIONS) - NotificationUIManager::RegisterPrefs(local_state); + NotificationPrefsManager::RegisterPrefs(local_state); #endif #if defined(ENABLE_SAFE_BROWSING) diff --git a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc index fb0de12..c8b2614 100644 --- a/chrome/browser/task_manager/task_manager_notification_resource_provider.cc +++ b/chrome/browser/task_manager/task_manager_notification_resource_provider.cc @@ -10,6 +10,7 @@ #include "chrome/browser/debugger/devtools_window.h" #include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/balloon_host.h" +#include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/common/chrome_notification_types.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc index 6dd8883..2a5810a 100644 --- a/chrome/browser/ui/panels/panel_browsertest.cc +++ b/chrome/browser/ui/panels/panel_browsertest.cc @@ -8,6 +8,7 @@ #include "chrome/browser/download/download_service.h" #include "chrome/browser/download/download_service_factory.h" #include "chrome/browser/net/url_request_mock_util.h" +#include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/balloon_collection_impl.h" #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/notification.h" diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 8d196f8..1fb6531 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1491,8 +1491,11 @@ 'browser/notifications/notification_object_proxy.h', 'browser/notifications/notification_options_menu_model.cc', 'browser/notifications/notification_options_menu_model.h', - 'browser/notifications/notification_ui_manager.cc', + 'browser/notifications/notification_prefs_manager.cc', + 'browser/notifications/notification_prefs_manager.h', 'browser/notifications/notification_ui_manager.h', + 'browser/notifications/notification_ui_manager_impl.cc', + 'browser/notifications/notification_ui_manager_impl.h', 'browser/ntp_background_util.cc', 'browser/ntp_background_util.h', 'browser/omnibox_search_hint.cc', |