| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |