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

Side by Side Diff: ui/message_center/message_center_util.cc

Issue 231723006: Remove balloon notification code. The last user was the Linux GTK port but that's deleted now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync after elliot's r263101 Created 6 years, 8 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/message_center/message_center_util.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/message_center/message_center_util.h" 5 #include "ui/message_center/message_center_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/message_center/message_center_switches.h" 8 #include "ui/message_center/message_center_switches.h"
9 9
10 namespace message_center { 10 namespace message_center {
11 11
12 // TODO(dimich): remove this function when balloon notifications are removed
13 // completely.
14 bool IsRichNotificationEnabled() {
15 #if defined(OS_MACOSX) || defined(USE_AURA)
16 return true;
17 #else
18 return false;
19 #endif
20 }
21
22 MessageCenterShowState GetMessageCenterShowState() { 12 MessageCenterShowState GetMessageCenterShowState() {
23 #if defined(OS_MACOSX) 13 #if defined(OS_MACOSX)
24 std::string tray_behavior = 14 std::string tray_behavior =
25 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 15 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
26 switches::kNotificationCenterTrayBehavior); 16 switches::kNotificationCenterTrayBehavior);
27 if (tray_behavior == "never") 17 if (tray_behavior == "never")
28 return MESSAGE_CENTER_SHOW_NEVER; 18 return MESSAGE_CENTER_SHOW_NEVER;
29 if (tray_behavior == "always") 19 if (tray_behavior == "always")
30 return MESSAGE_CENTER_SHOW_ALWAYS; 20 return MESSAGE_CENTER_SHOW_ALWAYS;
31 if (tray_behavior == "unread") 21 if (tray_behavior == "unread")
32 return MESSAGE_CENTER_SHOW_UNREAD; 22 return MESSAGE_CENTER_SHOW_UNREAD;
33 return MESSAGE_CENTER_SHOW_AFTER_FIRST; 23 return MESSAGE_CENTER_SHOW_AFTER_FIRST;
34 #elif defined(OS_CHROMEOS) 24 #elif defined(OS_CHROMEOS)
35 return MESSAGE_CENTER_SHOW_UNREAD; 25 return MESSAGE_CENTER_SHOW_UNREAD;
36 #else // defined(OS_WIN) || defined(OS_LINUX) 26 #else // defined(OS_WIN) || defined(OS_LINUX)
37 return MESSAGE_CENTER_SHOW_AFTER_FIRST; 27 return MESSAGE_CENTER_SHOW_AFTER_FIRST;
38 #endif 28 #endif
39 } 29 }
40 30
41 } // namespace message_center 31 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/message_center_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698