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

Side by Side Diff: chrome/browser/chromeos/notifications/system_notification.cc

Issue 4635007: When an extension is uninstalled, close all desktop notifications from that e... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/notifications/system_notification.h" 5 #include "chrome/browser/chromeos/notifications/system_notification.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/notifications/system_notification_factory.h" 9 #include "chrome/browser/chromeos/notifications/system_notification_factory.h"
10 #include "chrome/browser/dom_ui/dom_ui_util.h" 10 #include "chrome/browser/dom_ui/dom_ui_util.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 sticky, 58 sticky,
59 false /* no controls */); 59 false /* no controls */);
60 collection_->AddDOMUIMessageCallback(notify, "link", callback); 60 collection_->AddDOMUIMessageCallback(notify, "link", callback);
61 } 61 }
62 visible_ = true; 62 visible_ = true;
63 urgent_ = urgent; 63 urgent_ = urgent;
64 } 64 }
65 65
66 void SystemNotification::Hide() { 66 void SystemNotification::Hide() {
67 if (visible_) { 67 if (visible_) {
68 collection_->Remove(Notification(GURL(), GURL(), string16(), string16(), 68 collection_->RemoveById(delegate_->id());
69 delegate_.get()));
70
71 visible_ = false; 69 visible_ = false;
72 urgent_ = false; 70 urgent_ = false;
73 } 71 }
74 } 72 }
75 73
76 } // namespace chromeos 74 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/notifications/notification_panel.cc ('k') | chrome/browser/cocoa/notifications/balloon_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698