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_tray.cc

Issue 12635010: Start building message_center on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MessageCenterNotificationsTest Created 7 years, 9 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.gyp ('k') | ui/message_center/message_center_tray_delegate.h » ('j') | 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_tray.h" 5 #include "ui/message_center/message_center_tray.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/message_center/message_center_tray_delegate.h" 11 #include "ui/message_center/message_center_tray_delegate.h"
12 12
13 namespace message_center { 13 namespace message_center {
14 namespace { 14 namespace {
15 15
16 // Menu commands 16 // Menu commands
17 const int kToggleQuietMode = 0; 17 const int kToggleQuietMode = 0;
18 const int kEnableQuietModeHour = 1; 18 const int kEnableQuietModeHour = 1;
19 const int kEnableQuietModeDay = 2; 19 const int kEnableQuietModeDay = 2;
20 20
21 } 21 }
22 22
23 #if !defined(TOOLKIT_VIEWS)
24 MESSAGE_CENTER_EXPORT MessageCenterTrayDelegate* CreateMessageCenterTray() {
25 NOTIMPLEMENTED();
26 return NULL;
27 }
28 #endif
29
23 MessageCenterTray::MessageCenterTray( 30 MessageCenterTray::MessageCenterTray(
24 MessageCenterTrayDelegate* delegate, 31 MessageCenterTrayDelegate* delegate,
25 message_center::MessageCenter* message_center) 32 message_center::MessageCenter* message_center)
26 : message_center_(message_center), 33 : message_center_(message_center),
27 message_center_visible_(false), 34 message_center_visible_(false),
28 popups_visible_(false), 35 popups_visible_(false),
29 delegate_(delegate) { 36 delegate_(delegate) {
30 message_center_->AddObserver(this); 37 message_center_->AddObserver(this);
31 } 38 }
32 39
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 base::TimeDelta::FromDays(1): 159 base::TimeDelta::FromDays(1):
153 base::TimeDelta::FromHours(1); 160 base::TimeDelta::FromHours(1);
154 message_center()->notification_list()->EnterQuietModeWithExpire(expires_in); 161 message_center()->notification_list()->EnterQuietModeWithExpire(expires_in);
155 } 162 }
156 163
157 void MessageCenterTray::NotifyMessageCenterTrayChanged() { 164 void MessageCenterTray::NotifyMessageCenterTrayChanged() {
158 delegate_->OnMessageCenterTrayChanged(); 165 delegate_->OnMessageCenterTrayChanged();
159 } 166 }
160 167
161 } // namespace message_center 168 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/message_center.gyp ('k') | ui/message_center/message_center_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698