OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DELEGATE_H_ |
| 7 |
| 8 #include "chrome/browser/notifications/notification_delegate.h" |
| 9 |
| 10 // Temporary native notification delegate, it is only used |
| 11 // to extract the delegate id. |
| 12 // This is an interim state until the work in |
| 13 // https://bugs.chromium.org/p/chromium/issues/detail?id=720345 |
| 14 // is completed. A small delegate shim is needed since the |
| 15 // Notification object has a non virtual method (delegate_id) that is |
| 16 // used all over the place whose implementation returns delegate->id() |
| 17 class NativeNotificationDelegate : public NotificationDelegate { |
| 18 public: |
| 19 explicit NativeNotificationDelegate(const std::string& notification_id) |
| 20 : notification_id_(notification_id) {} |
| 21 std::string id() const override; |
| 22 |
| 23 private: |
| 24 ~NativeNotificationDelegate() override = default; |
| 25 const std::string notification_id_; |
| 26 |
| 27 DISALLOW_COPY_AND_ASSIGN(NativeNotificationDelegate); |
| 28 }; |
| 29 |
| 30 #endif // CHROME_BROWSER_NOTIFICATIONS_NATIVE_NOTIFICATION_DELEGATE_H_ |
OLD | NEW |