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

Side by Side Diff: content/shell/browser/layout_test/layout_test_notification_manager.h

Issue 2749453002: Make GetDisplayedNotifications asynchronous. (Closed)
Patch Set: review Created 3 years, 9 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 base::Closure* cancel_callback) override; 64 base::Closure* cancel_callback) override;
65 void DisplayPersistentNotification( 65 void DisplayPersistentNotification(
66 BrowserContext* browser_context, 66 BrowserContext* browser_context,
67 const std::string& notification_id, 67 const std::string& notification_id,
68 const GURL& service_worker_scope, 68 const GURL& service_worker_scope,
69 const GURL& origin, 69 const GURL& origin,
70 const PlatformNotificationData& notification_data, 70 const PlatformNotificationData& notification_data,
71 const NotificationResources& notification_resources) override; 71 const NotificationResources& notification_resources) override;
72 void ClosePersistentNotification(BrowserContext* browser_context, 72 void ClosePersistentNotification(BrowserContext* browser_context,
73 const std::string& notification_id) override; 73 const std::string& notification_id) override;
74 bool GetDisplayedNotifications( 74 void GetDisplayedNotifications(
75 BrowserContext* browser_context, 75 BrowserContext* browser_context,
76 std::set<std::string>* displayed_notifications) override; 76 const DisplayedNotificationsCallback& callback) override;
77 77
78 private: 78 private:
79 // Structure to represent the information of a persistent notification. 79 // Structure to represent the information of a persistent notification.
80 struct PersistentNotification { 80 struct PersistentNotification {
81 BrowserContext* browser_context = nullptr; 81 BrowserContext* browser_context = nullptr;
82 GURL origin; 82 GURL origin;
83 }; 83 };
84 84
85 // Closes the notification titled |title|. Must be called on the UI thread. 85 // Closes the notification titled |title|. Must be called on the UI thread.
86 void Close(const std::string& title); 86 void Close(const std::string& title);
(...skipping 15 matching lines...) Expand all
102 std::unordered_map<std::string, std::string> notification_id_map_; 102 std::unordered_map<std::string, std::string> notification_id_map_;
103 103
104 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_; 104 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager); 106 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager);
107 }; 107 };
108 108
109 } // content 109 } // content
110 110
111 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 111 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698