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

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

Issue 10967003: Add desktop type context to most existing instances of FindTabbedBrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving check_deps exception to specific_include_rules after chat with Kai. 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/status_area_widget.h" 8 #include "ash/system/status_area_widget.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/notifications/balloon.h" 10 #include "chrome/browser/notifications/balloon.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 void BalloonCollectionImplAsh::NotificationRemoved( 62 void BalloonCollectionImplAsh::NotificationRemoved(
63 const std::string& notifcation_id) { 63 const std::string& notifcation_id) {
64 RemoveById(notifcation_id); 64 RemoveById(notifcation_id);
65 } 65 }
66 66
67 void BalloonCollectionImplAsh::ShowSettings(const std::string& notifcation_id) { 67 void BalloonCollectionImplAsh::ShowSettings(const std::string& notifcation_id) {
68 Balloon* balloon = base().FindBalloonById(notifcation_id); 68 Balloon* balloon = base().FindBalloonById(notifcation_id);
69 Profile* profile = 69 Profile* profile =
70 balloon ? balloon->profile() : ProfileManager::GetDefaultProfile(); 70 balloon ? balloon->profile() : ProfileManager::GetDefaultProfile();
71 Browser* browser = browser::FindOrCreateTabbedBrowser(profile); 71 Browser* browser =
72 browser::FindOrCreateTabbedBrowser(profile,
73 chrome::HOST_DESKTOP_TYPE_ASH);
72 if (GetBalloonExtension(balloon)) 74 if (GetBalloonExtension(balloon))
73 chrome::ShowExtensions(browser); 75 chrome::ShowExtensions(browser);
74 else 76 else
75 chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 77 chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
76 } 78 }
77 79
78 void BalloonCollectionImplAsh::OnClicked(const std::string& notifcation_id) { 80 void BalloonCollectionImplAsh::OnClicked(const std::string& notifcation_id) {
79 Balloon* balloon = base().FindBalloonById(notifcation_id); 81 Balloon* balloon = base().FindBalloonById(notifcation_id);
80 if (!balloon) 82 if (!balloon)
81 return; 83 return;
(...skipping 53 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

Powered by Google App Engine
This is Rietveld 408576698