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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
10 #include "ash/shelf/shelf_layout_manager_observer.h" | 10 #include "ash/shelf/shelf_layout_manager_observer.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bubble_view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); | 96 bubble_view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); |
97 bubble->InitializeContents(bubble_view); | 97 bubble->InitializeContents(bubble_view); |
98 } | 98 } |
99 | 99 |
100 message_center::MessageBubbleBase* bubble() const { return bubble_.get(); } | 100 message_center::MessageBubbleBase* bubble() const { return bubble_.get(); } |
101 | 101 |
102 // Convenience accessors. | 102 // Convenience accessors. |
103 views::TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); } | 103 views::TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); } |
104 | 104 |
105 private: | 105 private: |
106 scoped_ptr<message_center::MessageBubbleBase> bubble_; | 106 std::unique_ptr<message_center::MessageBubbleBase> bubble_; |
107 scoped_ptr<TrayBubbleWrapper> bubble_wrapper_; | 107 std::unique_ptr<TrayBubbleWrapper> bubble_wrapper_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper); | 109 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper); |
110 }; | 110 }; |
111 | 111 |
112 class WebNotificationButton : public views::CustomButton { | 112 class WebNotificationButton : public views::CustomButton { |
113 public: | 113 public: |
114 WebNotificationButton(views::ButtonListener* listener) | 114 WebNotificationButton(views::ButtonListener* listener) |
115 : views::CustomButton(listener), | 115 : views::CustomButton(listener), |
116 is_bubble_visible_(false), | 116 is_bubble_visible_(false), |
117 unread_count_(0) { | 117 unread_count_(0) { |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 488 |
489 message_center::MessageCenterBubble* | 489 message_center::MessageCenterBubble* |
490 WebNotificationTray::GetMessageCenterBubbleForTest() { | 490 WebNotificationTray::GetMessageCenterBubbleForTest() { |
491 if (!message_center_bubble()) | 491 if (!message_center_bubble()) |
492 return NULL; | 492 return NULL; |
493 return static_cast<message_center::MessageCenterBubble*>( | 493 return static_cast<message_center::MessageCenterBubble*>( |
494 message_center_bubble()->bubble()); | 494 message_center_bubble()->bubble()); |
495 } | 495 } |
496 | 496 |
497 } // namespace ash | 497 } // namespace ash |
OLD | NEW |