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 "ash/system/web_notification/web_notification_tray.h" | 5 #include "ash/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include "ash/system/status_area_widget.h" | 7 #include "ash/system/status_area_widget.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/tray_bubble_view.h" | 9 #include "ash/system/tray/tray_bubble_view.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 | 423 |
424 layout->StartRow(0, 0); | 424 layout->StartRow(0, 0); |
425 layout->SkipColumns(2); | 425 layout->SkipColumns(2); |
426 layout->AddView(message, 1, 1); | 426 layout->AddView(message, 1, 1); |
427 if (menu_button_) | 427 if (menu_button_) |
428 layout->AddView(menu_button_, 1, 1); | 428 layout->AddView(menu_button_, 1, 1); |
429 layout->AddPaddingRow(0, kTrayPopupPaddingBetweenItems); | 429 layout->AddPaddingRow(0, kTrayPopupPaddingBetweenItems); |
430 } | 430 } |
431 | 431 |
432 // views::View overrides. | 432 // views::View overrides. |
433 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE { | 433 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE { |
434 tray_->OnClicked(notification_.id); | 434 tray_->OnClicked(notification_.id); |
435 return true; | 435 return true; |
436 } | 436 } |
437 | 437 |
438 virtual ui::GestureStatus OnGestureEvent( | 438 virtual ui::GestureStatus OnGestureEvent( |
439 const views::GestureEvent& event) OVERRIDE { | 439 const views::GestureEvent& event) OVERRIDE { |
440 if (event.type() != ui::ET_GESTURE_TAP) | 440 if (event.type() != ui::ET_GESTURE_TAP) |
441 return ui::GESTURE_STATUS_UNKNOWN; | 441 return ui::GESTURE_STATUS_UNKNOWN; |
442 tray_->OnClicked(notification_.id); | 442 tray_->OnClicked(notification_.id); |
443 return ui::GESTURE_STATUS_CONSUMED; | 443 return ui::GESTURE_STATUS_CONSUMED; |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 } else if (bubble == notification_bubble()) { | 1064 } else if (bubble == notification_bubble()) { |
1065 HideNotificationBubble(); | 1065 HideNotificationBubble(); |
1066 } | 1066 } |
1067 } | 1067 } |
1068 | 1068 |
1069 bool WebNotificationTray::HasNotificationForTest(const std::string& id) const { | 1069 bool WebNotificationTray::HasNotificationForTest(const std::string& id) const { |
1070 return notification_list_->HasNotification(id); | 1070 return notification_list_->HasNotification(id); |
1071 } | 1071 } |
1072 | 1072 |
1073 } // namespace ash | 1073 } // namespace ash |
OLD | NEW |