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

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

Issue 776813004: Introduce new content APIs for persistent notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-sw-contentclient
Patch Set: Created 6 years 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // PlatformNotificationService implementation. 46 // PlatformNotificationService implementation.
47 blink::WebNotificationPermission CheckPermission( 47 blink::WebNotificationPermission CheckPermission(
48 ResourceContext* resource_context, 48 ResourceContext* resource_context,
49 const GURL& origin, 49 const GURL& origin,
50 int render_process_id) override; 50 int render_process_id) override;
51 void DisplayNotification(BrowserContext* browser_context, 51 void DisplayNotification(BrowserContext* browser_context,
52 const ShowDesktopNotificationHostMsgParams& params, 52 const ShowDesktopNotificationHostMsgParams& params,
53 scoped_ptr<DesktopNotificationDelegate> delegate, 53 scoped_ptr<DesktopNotificationDelegate> delegate,
54 int render_process_id, 54 int render_process_id,
55 base::Closure* cancel_callback) override; 55 base::Closure* cancel_callback) override;
56 void DisplayPersistentNotification(
57 BrowserContext* browser_context,
58 int64 service_worker_registration_id,
59 const ShowDesktopNotificationHostMsgParams& params,
60 int render_process_id) override;
61 void ClosePersistentNotification(
62 BrowserContext* browser_context,
63 const std::string& persistent_notification_id) override;
56 64
57 private: 65 private:
58 // Closes the notification titled |title|. Must be called on the UI thread. 66 // Closes the notification titled |title|. Must be called on the UI thread.
59 void Close(const std::string& title); 67 void Close(const std::string& title);
60 68
61 typedef std::map<GURL, blink::WebNotificationPermission> 69 typedef std::map<GURL, blink::WebNotificationPermission>
62 NotificationPermissionMap; 70 NotificationPermissionMap;
63 NotificationPermissionMap permission_map_; 71 NotificationPermissionMap permission_map_;
64 72
65 std::map<std::string, DesktopNotificationDelegate*> notifications_; 73 std::map<std::string, DesktopNotificationDelegate*> notifications_;
66 std::map<std::string, std::string> replacements_; 74 std::map<std::string, std::string> replacements_;
67 75
68 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_; 76 base::WeakPtrFactory<LayoutTestNotificationManager> weak_factory_;
69 77
70 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager); 78 DISALLOW_COPY_AND_ASSIGN(LayoutTestNotificationManager);
71 }; 79 };
72 80
73 } // content 81 } // content
74 82
75 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_ 83 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_NOTIFICATION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698