OLD | NEW |
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/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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 ControlButton *close = new ControlButton(this); | 300 ControlButton *close = new ControlButton(this); |
301 close->SetPadding(-kCloseIconRightPadding, kCloseIconTopPadding); | 301 close->SetPadding(-kCloseIconRightPadding, kCloseIconTopPadding); |
302 close->SetNormalImage(IDR_NOTIFICATION_CLOSE); | 302 close->SetNormalImage(IDR_NOTIFICATION_CLOSE); |
303 close->SetHoveredImage(IDR_NOTIFICATION_CLOSE_HOVER); | 303 close->SetHoveredImage(IDR_NOTIFICATION_CLOSE_HOVER); |
304 close->SetPressedImage(IDR_NOTIFICATION_CLOSE_PRESSED); | 304 close->SetPressedImage(IDR_NOTIFICATION_CLOSE_PRESSED); |
305 close->set_owned_by_client(); | 305 close->set_owned_by_client(); |
306 close_button_.reset(close); | 306 close_button_.reset(close); |
307 | 307 |
308 ControlButton *expand = new ControlButton(this); | 308 ControlButton *expand = new ControlButton(this); |
309 expand->SetPadding(-kExpandIconRightPadding, -kExpandIconBottomPadding); | 309 expand->SetPadding(-kExpandIconRightPadding, -kExpandIconBottomPadding); |
310 expand->SetNormalImage(IDR_NOTIFICATIONS_EXPAND); | 310 expand->SetNormalImage(IDR_NOTIFICATION_EXPAND); |
311 expand->SetHoveredImage(IDR_NOTIFICATIONS_EXPAND_HOVER); | 311 expand->SetHoveredImage(IDR_NOTIFICATION_EXPAND_HOVER); |
312 expand->SetPressedImage(IDR_NOTIFICATIONS_EXPAND_PRESSED); | 312 expand->SetPressedImage(IDR_NOTIFICATION_EXPAND_PRESSED); |
313 expand->set_owned_by_client(); | 313 expand->set_owned_by_client(); |
314 expand_button_.reset(expand); | 314 expand_button_.reset(expand); |
315 | 315 |
316 if (IsRichNotificationEnabled()) | 316 if (IsRichNotificationEnabled()) |
317 set_border(new ShadowBorder()); | 317 set_border(new ShadowBorder()); |
318 } | 318 } |
319 | 319 |
320 MessageView::MessageView() { | 320 MessageView::MessageView() { |
321 } | 321 } |
322 | 322 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 gfx::Rect(screen_location, gfx::Size()), | 391 gfx::Rect(screen_location, gfx::Size()), |
392 views::MenuItemView::TOPRIGHT, | 392 views::MenuItemView::TOPRIGHT, |
393 views::MenuRunner::HAS_MNEMONICS)); | 393 views::MenuRunner::HAS_MNEMONICS)); |
394 } | 394 } |
395 | 395 |
396 void MessageView::OnSlideOut() { | 396 void MessageView::OnSlideOut() { |
397 message_center_->RemoveNotification(notification_id_, true); // By user. | 397 message_center_->RemoveNotification(notification_id_, true); // By user. |
398 } | 398 } |
399 | 399 |
400 } // namespace message_center | 400 } // namespace message_center |
OLD | NEW |