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

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

Issue 10690031: Turn of ash notification tray by default for M21. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/status_area_widget.h" 9 #include "ash/system/status_area_widget.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "chrome/browser/extensions/extension_service.h" 11 #include "chrome/browser/extensions/extension_service.h"
12 #include "chrome/browser/notifications/balloon.h" 12 #include "chrome/browser/notifications/balloon.h"
13 #include "chrome/browser/notifications/desktop_notification_service.h" 13 #include "chrome/browser/notifications/desktop_notification_service.h"
14 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 14 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
15 #include "chrome/browser/notifications/notification.h" 15 #include "chrome/browser/notifications/notification.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/browser_finder.h" 17 #include "chrome/browser/ui/browser_finder.h"
18 #include "chrome/browser/ui/views/ash/balloon_view_ash.h" 18 #include "chrome/browser/ui/views/ash/balloon_view_ash.h"
19 #include "chrome/browser/ui/views/notifications/balloon_view_host.h" 19 #include "chrome/browser/ui/views/notifications/balloon_view_host.h"
20 #include "chrome/browser/ui/views/notifications/balloon_view_views.h" 20 #include "chrome/browser/ui/views/notifications/balloon_view_views.h"
21 21
22 namespace { 22 namespace {
23 23
24 bool IsAshNotifyEnabled() { 24 bool IsAshNotifyEnabled() {
25 return !CommandLine::ForCurrentProcess()->HasSwitch( 25 return CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify);
26 ash::switches::kAshNotifyDisabled);
27 } 26 }
28 27
29 } // namespace 28 } // namespace
30 29
31 BalloonCollectionImplAsh::BalloonCollectionImplAsh() { 30 BalloonCollectionImplAsh::BalloonCollectionImplAsh() {
32 if (IsAshNotifyEnabled()) { 31 if (IsAshNotifyEnabled()) {
33 ash::Shell::GetInstance()->status_area_widget()-> 32 ash::Shell::GetInstance()->status_area_widget()->
34 web_notification_tray()->SetDelegate(this); 33 web_notification_tray()->SetDelegate(this);
35 } 34 }
36 } 35 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 167 }
169 168
170 // For now, only use BalloonCollectionImplAsh on ChromeOS, until 169 // For now, only use BalloonCollectionImplAsh on ChromeOS, until
171 // system_notifications_ is replaced with status area notifications. 170 // system_notifications_ is replaced with status area notifications.
172 #if defined(OS_CHROMEOS) 171 #if defined(OS_CHROMEOS)
173 // static 172 // static
174 BalloonCollection* BalloonCollection::Create() { 173 BalloonCollection* BalloonCollection::Create() {
175 return new BalloonCollectionImplAsh(); 174 return new BalloonCollectionImplAsh();
176 } 175 }
177 #endif 176 #endif
OLDNEW
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698