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 // The ChromeNotifierService works together with sync to maintain the state of | 5 // The ChromeNotifierService works together with sync to maintain the state of |
6 // user notifications, which can then be presented in the notification center, | 6 // user notifications, which can then be presented in the notification center, |
7 // via the Notification UI Manager. | 7 // via the Notification UI Manager. |
8 | 8 |
9 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" | 9 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
10 | 10 |
11 #include "chrome/browser/notifications/notification.h" | 11 #include "chrome/browser/notifications/notification.h" |
12 #include "chrome/browser/notifications/notification_ui_manager.h" | 12 #include "chrome/browser/notifications/notification_ui_manager.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "sync/api/sync_change.h" | 15 #include "sync/api/sync_change.h" |
16 #include "sync/api/sync_change_processor.h" | 16 #include "sync/api/sync_change_processor.h" |
17 #include "sync/api/sync_error_factory.h" | 17 #include "sync/api/sync_error_factory.h" |
18 #include "sync/protocol/sync.pb.h" | 18 #include "sync/protocol/sync.pb.h" |
19 #include "sync/protocol/synced_notification_specifics.pb.h" | 19 #include "sync/protocol/synced_notification_specifics.pb.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" |
21 #include "ui/message_center/message_center_util.h" | |
dewittj
2013/05/08 18:53:01
Why add these lines?
Dmitry Titov
2013/05/08 23:03:26
Indeed, not needed after merge :-) Removed.
| |
22 #include "ui/message_center/notification_types.h" | |
21 | 23 |
22 namespace notifier { | 24 namespace notifier { |
23 | 25 |
24 ChromeNotifierService::ChromeNotifierService(Profile* profile, | 26 ChromeNotifierService::ChromeNotifierService(Profile* profile, |
25 NotificationUIManager* manager) | 27 NotificationUIManager* manager) |
26 : profile_(profile), notification_manager_(manager) {} | 28 : profile_(profile), notification_manager_(manager) {} |
27 ChromeNotifierService::~ChromeNotifierService() {} | 29 ChromeNotifierService::~ChromeNotifierService() {} |
28 | 30 |
29 // Methods from ProfileKeyedService. | 31 // Methods from ProfileKeyedService. |
30 void ChromeNotifierService::Shutdown() { | 32 void ChromeNotifierService::Shutdown() { |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 void ChromeNotifierService::Add(scoped_ptr<SyncedNotification> notification) { | 257 void ChromeNotifierService::Add(scoped_ptr<SyncedNotification> notification) { |
256 SyncedNotification* notification_copy = notification.get(); | 258 SyncedNotification* notification_copy = notification.get(); |
257 // Take ownership of the object and put it into our local storage. | 259 // Take ownership of the object and put it into our local storage. |
258 notification_data_.push_back(notification.release()); | 260 notification_data_.push_back(notification.release()); |
259 | 261 |
260 // Get the contained bitmaps, and show the notification once we have them. | 262 // Get the contained bitmaps, and show the notification once we have them. |
261 notification_copy->Show(notification_manager_, this, profile_); | 263 notification_copy->Show(notification_manager_, this, profile_); |
262 } | 264 } |
263 | 265 |
264 } // namespace notifier | 266 } // namespace notifier |
OLD | NEW |