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

Side by Side Diff: chrome/browser/notifications/native_notification_delegate.h

Issue 2888303004: Minimize the delegate dependencies for non persistent notifications. (Closed)
Patch Set: review Created 3 years, 6 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698