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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 this, | 182 this, |
183 message_center::MessageCenter::Get())); | 183 message_center::MessageCenter::Get())); |
184 popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate()); | 184 popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate()); |
185 popup_collection_.reset(new message_center::MessagePopupCollection( | 185 popup_collection_.reset(new message_center::MessagePopupCollection( |
186 ash::Shell::GetContainer( | 186 ash::Shell::GetContainer( |
187 status_area_widget->GetNativeView()->GetRootWindow(), | 187 status_area_widget->GetNativeView()->GetRootWindow(), |
188 kShellWindowId_StatusContainer), | 188 kShellWindowId_StatusContainer), |
189 message_center(), | 189 message_center(), |
190 message_center_tray_.get(), | 190 message_center_tray_.get(), |
191 popup_alignment_delegate_.get())); | 191 popup_alignment_delegate_.get())); |
192 const gfx::Display& display = Shell::GetScreen()->GetDisplayNearestWindow( | 192 const gfx::Display& display = |
193 status_area_widget->GetNativeView()); | 193 gfx::Screen::GetScreen()->GetDisplayNearestWindow( |
194 popup_alignment_delegate_->StartObserving(Shell::GetScreen(), display); | 194 status_area_widget->GetNativeView()); |
| 195 popup_alignment_delegate_->StartObserving(gfx::Screen::GetScreen(), display); |
195 OnMessageCenterTrayChanged(); | 196 OnMessageCenterTrayChanged(); |
196 } | 197 } |
197 | 198 |
198 WebNotificationTray::~WebNotificationTray() { | 199 WebNotificationTray::~WebNotificationTray() { |
199 // Release any child views that might have back pointers before ~View(). | 200 // Release any child views that might have back pointers before ~View(). |
200 message_center_bubble_.reset(); | 201 message_center_bubble_.reset(); |
201 popup_alignment_delegate_.reset(); | 202 popup_alignment_delegate_.reset(); |
202 popup_collection_.reset(); | 203 popup_collection_.reset(); |
203 } | 204 } |
204 | 205 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 494 |
494 message_center::MessageCenterBubble* | 495 message_center::MessageCenterBubble* |
495 WebNotificationTray::GetMessageCenterBubbleForTest() { | 496 WebNotificationTray::GetMessageCenterBubbleForTest() { |
496 if (!message_center_bubble()) | 497 if (!message_center_bubble()) |
497 return NULL; | 498 return NULL; |
498 return static_cast<message_center::MessageCenterBubble*>( | 499 return static_cast<message_center::MessageCenterBubble*>( |
499 message_center_bubble()->bubble()); | 500 message_center_bubble()->bubble()); |
500 } | 501 } |
501 | 502 |
502 } // namespace ash | 503 } // namespace ash |
OLD | NEW |