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

Side by Side Diff: ui/message_center/views/message_view.cc

Issue 23636010: Notifications: Add cross-platform UMA: ShowMessageCenter, ShowSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added the hash to chromeactions.txt Created 7 years, 3 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/views/message_center_view.cc ('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/message_center/views/message_view.h" 5 #include "ui/message_center/views/message_view.h"
6 6
7 #include "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "grit/ui_strings.h" 8 #include "grit/ui_strings.h"
9 #include "ui/base/accessibility/accessible_view_state.h" 9 #include "ui/base/accessibility/accessible_view_state.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 void MenuModel::ExecuteCommand(int command_id, int event_flags) { 234 void MenuModel::ExecuteCommand(int command_id, int event_flags) {
235 switch (command_id) { 235 switch (command_id) {
236 case kTogglePermissionCommand: 236 case kTogglePermissionCommand:
237 message_center_->DisableNotificationsByNotifier(notifier_id_); 237 message_center_->DisableNotificationsByNotifier(notifier_id_);
238 break; 238 break;
239 case kShowSettingsCommand: 239 case kShowSettingsCommand:
240 // |tray_| may be NULL in tests. 240 // |tray_| may be NULL in tests.
241 if (tray_) 241 if (tray_)
242 tray_->ShowNotifierSettingsBubble(); 242 tray_->ShowNotifierSettingsBubble();
243 else
244 message_center_->ShowNotificationSettings(notification_id_);
245 break; 243 break;
246 default: 244 default:
247 NOTREACHED(); 245 NOTREACHED();
248 } 246 }
249 } 247 }
250 248
251 } // namespace 249 } // namespace
252 250
253 namespace message_center { 251 namespace message_center {
254 252
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 is_expanded_ = true; 445 is_expanded_ = true;
448 message_center_->ExpandNotification(notification_id_); 446 message_center_->ExpandNotification(notification_id_);
449 } 447 }
450 } 448 }
451 449
452 void MessageView::OnSlideOut() { 450 void MessageView::OnSlideOut() {
453 message_center_->RemoveNotification(notification_id_, true); // By user. 451 message_center_->RemoveNotification(notification_id_, true); // By user.
454 } 452 }
455 453
456 } // namespace message_center 454 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698