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/chromeos/extensions/file_browser_notifications.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_notifications.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/chromeos/notifications/system_notification.h" | 14 #include "chrome/browser/chromeos/notifications/system_notification.h" |
15 #include "chrome/browser/notifications/desktop_notification_service.h" | 15 #include "chrome/browser/notifications/desktop_notification_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
19 #include "chrome/browser/ui/webui/web_ui_util.h" | 19 #include "chrome/browser/ui/webui/web_ui_util.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| 23 #include "grit/theme_resources_standard.h" |
23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
25 | 26 |
26 namespace { | 27 namespace { |
27 | 28 |
28 int GetIconId(FileBrowserNotifications::NotificationType type) { | 29 int GetIconId(FileBrowserNotifications::NotificationType type) { |
29 switch (type) { | 30 switch (type) { |
30 case FileBrowserNotifications::DEVICE: | 31 case FileBrowserNotifications::DEVICE: |
31 case FileBrowserNotifications::FORMAT_SUCCESS: | 32 case FileBrowserNotifications::FORMAT_SUCCESS: |
32 case FileBrowserNotifications::FORMAT_START: | 33 case FileBrowserNotifications::FORMAT_START: |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 void FileBrowserNotifications::HideNotificationById(const std::string& id) { | 391 void FileBrowserNotifications::HideNotificationById(const std::string& id) { |
391 NotificationMap::iterator it = notification_map_.find(id); | 392 NotificationMap::iterator it = notification_map_.find(id); |
392 if (it != notification_map_.end()) { | 393 if (it != notification_map_.end()) { |
393 delete it->second; | 394 delete it->second; |
394 notification_map_.erase(it); | 395 notification_map_.erase(it); |
395 } else { | 396 } else { |
396 // Mark as hidden so it does not get shown from a delayed task. | 397 // Mark as hidden so it does not get shown from a delayed task. |
397 hidden_notifications_.insert(id); | 398 hidden_notifications_.insert(id); |
398 } | 399 } |
399 } | 400 } |
OLD | NEW |