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

Side by Side Diff: chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc

Issue 11189099: Re-factor Ash Message Center code part 4/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/views/ash/balloon_collection_impl_ash.h" 5 #include "chrome/browser/ui/views/ash/balloon_collection_impl_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/web_notification/web_notification_tray.h"
8 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/notifications/balloon.h" 10 #include "chrome/browser/notifications/balloon.h"
10 #include "chrome/browser/notifications/desktop_notification_service.h" 11 #include "chrome/browser/notifications/desktop_notification_service.h"
11 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 12 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
12 #include "chrome/browser/notifications/notification.h" 13 #include "chrome/browser/notifications/notification.h"
13 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/browser_finder.h" 15 #include "chrome/browser/ui/browser_finder.h"
15 #include "chrome/browser/ui/chrome_pages.h" 16 #include "chrome/browser/ui/chrome_pages.h"
16 #include "chrome/browser/ui/views/ash/balloon_view_ash.h" 17 #include "chrome/browser/ui/views/ash/balloon_view_ash.h"
17 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" 18 #include "chrome/browser/ui/views/notifications/balloon_view_host.h"
18 #include "chrome/browser/ui/views/notifications/balloon_view_views.h" 19 #include "chrome/browser/ui/views/notifications/balloon_view_views.h"
19 20
20 BalloonCollectionImplAsh::BalloonCollectionImplAsh() { 21 BalloonCollectionImplAsh::BalloonCollectionImplAsh() {
21 ash::Shell::GetInstance()->GetWebNotificationTray()->SetDelegate(this); 22 ash::Shell::GetInstance()->GetWebNotificationTray()->message_center()->
23 SetDelegate(this);
22 } 24 }
23 25
24 BalloonCollectionImplAsh::~BalloonCollectionImplAsh() { 26 BalloonCollectionImplAsh::~BalloonCollectionImplAsh() {
25 } 27 }
26 28
27 bool BalloonCollectionImplAsh::HasSpace() const { 29 bool BalloonCollectionImplAsh::HasSpace() const {
28 return true; // Overflow is handled by ash::WebNotificationTray. 30 return true; // Overflow is handled by ash::WebNotificationTray.
29 } 31 }
30 32
31 void BalloonCollectionImplAsh::Add(const Notification& notification, 33 void BalloonCollectionImplAsh::Add(const Notification& notification,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return extension_service->extensions()->GetExtensionOrAppByURL( 137 return extension_service->extensions()->GetExtensionOrAppByURL(
136 ExtensionURLInfo(origin)); 138 ExtensionURLInfo(origin));
137 } 139 }
138 140
139 #if defined(OS_CHROMEOS) 141 #if defined(OS_CHROMEOS)
140 // static 142 // static
141 BalloonCollection* BalloonCollection::Create() { 143 BalloonCollection* BalloonCollection::Create() {
142 return new BalloonCollectionImplAsh(); 144 return new BalloonCollectionImplAsh();
143 } 145 }
144 #endif 146 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/balloon_collection_impl_ash.h ('k') | chrome/browser/ui/views/ash/balloon_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698