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

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

Issue 2960333003: Extract the view of control buttons on notification into a separated class (Closed)
Patch Set: addressed comments Created 3 years, 5 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
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 "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/accessibility/ax_node_data.h" 8 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 void MessageView::OnSlideChanged() {} 228 void MessageView::OnSlideChanged() {}
229 229
230 void MessageView::OnSlideOut() { 230 void MessageView::OnSlideOut() {
231 controller_->RemoveNotification(notification_id_, true); // By user. 231 controller_->RemoveNotification(notification_id_, true); // By user.
232 } 232 }
233 233
234 void MessageView::OnCloseButtonPressed() { 234 void MessageView::OnCloseButtonPressed() {
235 controller_->RemoveNotification(notification_id_, true); // By user. 235 controller_->RemoveNotification(notification_id_, true); // By user.
236 } 236 }
237 237
238 void MessageView::OnSettingsButtonPressed() {
239 controller_->ClickOnSettingsButton(notification_id_);
240 }
241
238 void MessageView::SetDrawBackgroundAsActive(bool active) { 242 void MessageView::SetDrawBackgroundAsActive(bool active) {
239 background_view_->background()-> 243 background_view_->background()->
240 SetNativeControlColor(active ? kHoveredButtonBackgroundColor : 244 SetNativeControlColor(active ? kHoveredButtonBackgroundColor :
241 kNotificationBackgroundColor); 245 kNotificationBackgroundColor);
242 SchedulePaint(); 246 SchedulePaint();
243 } 247 }
244 248
245 } // namespace message_center 249 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_view.h ('k') | ui/message_center/views/notification_control_buttons_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698