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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray.cc

Issue 2075953003: mash: Convert WebNotificationTray to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@statusarea
Patch Set: rebase Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/message_center/web_notification_tray.h" 5 #include "chrome/browser/ui/views/message_center/web_notification_tray.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "ui/display/screen.h" 8 #include "ui/display/screen.h"
9 #include "ui/message_center/message_center_tray.h" 9 #include "ui/message_center/message_center_tray.h"
10 #include "ui/message_center/message_center_tray_delegate.h" 10 #include "ui/message_center/message_center_tray_delegate.h"
11 #include "ui/message_center/views/desktop_popup_alignment_delegate.h" 11 #include "ui/message_center/views/desktop_popup_alignment_delegate.h"
12 #include "ui/message_center/views/message_popup_collection.h" 12 #include "ui/message_center/views/message_popup_collection.h"
13 13
14 namespace message_center { 14 namespace message_center {
15 15
16 MessageCenterTrayDelegate* CreateMessageCenterTray() { 16 MessageCenterTrayDelegate* CreateMessageCenterTray() {
17 return new WebNotificationTray(); 17 return new WebNotificationTray();
18 } 18 }
19 19
20 WebNotificationTray::WebNotificationTray() { 20 WebNotificationTray::WebNotificationTray() {
21 message_center_tray_.reset( 21 message_center_tray_.reset(
22 new MessageCenterTray(this, g_browser_process->message_center())); 22 new MessageCenterTray(this, g_browser_process->message_center()));
23 alignment_delegate_.reset(new message_center::DesktopPopupAlignmentDelegate); 23 alignment_delegate_.reset(new message_center::DesktopPopupAlignmentDelegate);
24 popup_collection_.reset(new message_center::MessagePopupCollection( 24 popup_collection_.reset(new message_center::MessagePopupCollection(
25 NULL, message_center(), message_center_tray_.get(), 25 message_center(), message_center_tray_.get(), alignment_delegate_.get()));
26 alignment_delegate_.get()));
27 } 26 }
28 27
29 WebNotificationTray::~WebNotificationTray() { 28 WebNotificationTray::~WebNotificationTray() {
30 // Reset this early so that delegated events during destruction don't cause 29 // Reset this early so that delegated events during destruction don't cause
31 // problems. 30 // problems.
32 popup_collection_.reset(); 31 popup_collection_.reset();
33 message_center_tray_.reset(); 32 message_center_tray_.reset();
34 } 33 }
35 34
36 message_center::MessageCenter* WebNotificationTray::message_center() { 35 message_center::MessageCenter* WebNotificationTray::message_center() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 67 }
69 68
70 void WebNotificationTray::OnMessageCenterTrayChanged() { 69 void WebNotificationTray::OnMessageCenterTrayChanged() {
71 } 70 }
72 71
73 MessageCenterTray* WebNotificationTray::GetMessageCenterTray() { 72 MessageCenterTray* WebNotificationTray::GetMessageCenterTray() {
74 return message_center_tray_.get(); 73 return message_center_tray_.get();
75 } 74 }
76 75
77 } // namespace message_center 76 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698