OLD | NEW |
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/balloon_notification_ui_manager.h" | 5 #include "chrome/browser/notifications/balloon_notification_ui_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_service.h" |
9 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
10 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/fullscreen.h" | 12 #include "chrome/browser/fullscreen.h" |
12 #include "chrome/browser/idle.h" | 13 #include "chrome/browser/idle.h" |
13 #include "chrome/browser/notifications/balloon_collection.h" | 14 #include "chrome/browser/notifications/balloon_collection.h" |
14 #include "chrome/browser/notifications/notification.h" | 15 #include "chrome/browser/notifications/notification.h" |
15 #include "chrome/browser/prefs/pref_service.h" | |
16 #include "chrome/common/chrome_notification_types.h" | 16 #include "chrome/common/chrome_notification_types.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
19 | 19 |
20 BalloonNotificationUIManager::BalloonNotificationUIManager( | 20 BalloonNotificationUIManager::BalloonNotificationUIManager( |
21 PrefService* local_state) | 21 PrefService* local_state) |
22 : NotificationUIManagerImpl(), | 22 : NotificationUIManagerImpl(), |
23 balloon_collection_(NULL) { | 23 balloon_collection_(NULL) { |
24 position_pref_.Init( | 24 position_pref_.Init( |
25 prefs::kDesktopNotificationPosition, | 25 prefs::kDesktopNotificationPosition, |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 BalloonNotificationUIManager::GetInstanceForTesting() { | 146 BalloonNotificationUIManager::GetInstanceForTesting() { |
147 if (NotificationUIManager::DelegatesToMessageCenter()) { | 147 if (NotificationUIManager::DelegatesToMessageCenter()) { |
148 LOG(ERROR) << "Attempt to run a test that requires " | 148 LOG(ERROR) << "Attempt to run a test that requires " |
149 << "BalloonNotificationUIManager while delegating to a " | 149 << "BalloonNotificationUIManager while delegating to a " |
150 << "native MessageCenter. Test will fail. Ask dimich@"; | 150 << "native MessageCenter. Test will fail. Ask dimich@"; |
151 return NULL; | 151 return NULL; |
152 } | 152 } |
153 return static_cast<BalloonNotificationUIManager*>( | 153 return static_cast<BalloonNotificationUIManager*>( |
154 g_browser_process->notification_ui_manager()); | 154 g_browser_process->notification_ui_manager()); |
155 } | 155 } |
OLD | NEW |