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

Side by Side Diff: ui/notifications/notification_types.cc

Issue 12212037: Update notifications API after review. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflict resolved Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/notifications/notification_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/notifications/notification_types.h" 5 #include "ui/notifications/notification_types.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 namespace notifications { 9 namespace notifications {
10 10
11 const char kMessageIntentKey[] = "message_intent"; 11 const char kMessageIntentKey[] = "message_intent";
12 const char kPriorityKey[] = "priority"; 12 const char kPriorityKey[] = "priority";
13 const char kTimestampKey[] = "timestamp"; 13 const char kTimestampKey[] = "timestamp";
14 const char kUnreadCountKey[] = "unread_count"; 14 const char kUnreadCountKey[] = "unread_count";
15 const char kButtonOneTitleKey[] = "button_one_title"; 15 const char kButtonOneTitleKey[] = "button_one_title";
16 const char kButtonOneIconUrlKey[] = "button_one_icon_url"; 16 const char kButtonOneIconUrlKey[] = "button_one_icon_url";
17 const char kButtonTwoTitleKey[] = "button_two_title"; 17 const char kButtonTwoTitleKey[] = "button_two_title";
18 const char kButtonTwoIconUrlKey[] = "button_two_icon_url"; 18 const char kButtonTwoIconUrlKey[] = "button_two_icon_url";
19 const char kExpandedMessageKey[] = "expanded_message"; 19 const char kExpandedMessageKey[] = "expanded_message";
20 const char kImageUrlKey[] = "image_url"; 20 const char kImageUrlKey[] = "image_url";
21 const char kItemsKey[] = "items"; 21 const char kItemsKey[] = "items";
22 const char kItemTitleKey[] = "title"; 22 const char kItemTitleKey[] = "title";
23 const char kItemMessageKey[] = "message"; 23 const char kItemMessageKey[] = "message";
24 24
25 const char kSimpleType[] = "simple";
26 const char kBaseFormatType[] = "base";
27 const char kImageType[] = "image";
28 const char kMultipleType[] = "multiple";
29
30 NotificationType StringToNotificationType(std::string& string_type) {
31 // In case of unrecognized string, fall back to most common type.
32 return (string_type == kSimpleType) ? NOTIFICATION_TYPE_SIMPLE :
33 (string_type == kBaseFormatType) ? NOTIFICATION_TYPE_BASE_FORMAT :
34 (string_type == kImageType) ? NOTIFICATION_TYPE_IMAGE :
35 (string_type == kMultipleType) ? NOTIFICATION_TYPE_MULTIPLE :
36 NOTIFICATION_TYPE_SIMPLE;
37 }
38
39 } // namespace notifications 25 } // namespace notifications
40 26
41 } // namespace ui 27 } // namespace ui
OLDNEW
« no previous file with comments | « ui/notifications/notification_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698