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

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

Issue 1943963004: Revert of (reland) Move permission.mojom from WebKit/public/platform/ to components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <unordered_set> 14 #include <unordered_set>
15 15
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/singleton.h" 18 #include "base/memory/singleton.h"
19 #include "base/strings/string16.h" 19 #include "base/strings/string16.h"
20 #include "chrome/browser/notifications/notification.h" 20 #include "chrome/browser/notifications/notification.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "components/permissions/permission_status.mojom.h"
23 #include "content/public/browser/platform_notification_service.h" 22 #include "content/public/browser/platform_notification_service.h"
24 #include "content/public/common/persistent_notification_status.h" 23 #include "content/public/common/persistent_notification_status.h"
24 #include "third_party/WebKit/public/platform/modules/permissions/permission_stat us.mojom.h"
25 25
26 class NotificationDelegate; 26 class NotificationDelegate;
27 class NotificationDisplayService; 27 class NotificationDisplayService;
28 28
29 namespace content { 29 namespace content {
30 class BrowserContext; 30 class BrowserContext;
31 struct NotificationResources; 31 struct NotificationResources;
32 } 32 }
33 33
34 namespace gcm { 34 namespace gcm {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 void OnPersistentNotificationClose(content::BrowserContext* browser_context, 77 void OnPersistentNotificationClose(content::BrowserContext* browser_context,
78 int64_t persistent_notification_id, 78 int64_t persistent_notification_id,
79 const GURL& origin, 79 const GURL& origin,
80 bool by_user); 80 bool by_user);
81 81
82 82
83 // Open the Notification settings screen when clicking the right button. 83 // Open the Notification settings screen when clicking the right button.
84 void OpenNotificationSettings(content::BrowserContext* browser_context); 84 void OpenNotificationSettings(content::BrowserContext* browser_context);
85 85
86 // content::PlatformNotificationService implementation. 86 // content::PlatformNotificationService implementation.
87 permissions::mojom::PermissionStatus CheckPermissionOnUIThread( 87 blink::mojom::PermissionStatus CheckPermissionOnUIThread(
88 content::BrowserContext* browser_context, 88 content::BrowserContext* browser_context,
89 const GURL& origin, 89 const GURL& origin,
90 int render_process_id) override; 90 int render_process_id) override;
91 permissions::mojom::PermissionStatus CheckPermissionOnIOThread( 91 blink::mojom::PermissionStatus CheckPermissionOnIOThread(
92 content::ResourceContext* resource_context, 92 content::ResourceContext* resource_context,
93 const GURL& origin, 93 const GURL& origin,
94 int render_process_id) override; 94 int render_process_id) override;
95 void DisplayNotification( 95 void DisplayNotification(
96 content::BrowserContext* browser_context, 96 content::BrowserContext* browser_context,
97 const GURL& origin, 97 const GURL& origin,
98 const content::PlatformNotificationData& notification_data, 98 const content::PlatformNotificationData& notification_data,
99 const content::NotificationResources& notification_resources, 99 const content::NotificationResources& notification_resources,
100 std::unique_ptr<content::DesktopNotificationDelegate> delegate, 100 std::unique_ptr<content::DesktopNotificationDelegate> delegate,
101 base::Closure* cancel_callback) override; 101 base::Closure* cancel_callback) override;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // programmatically to avoid dispatching close events for them. 156 // programmatically to avoid dispatching close events for them.
157 std::unordered_set<int64_t> closed_notifications_; 157 std::unordered_set<int64_t> closed_notifications_;
158 158
159 // Only set and used for tests, owned by the caller in that case. 159 // Only set and used for tests, owned by the caller in that case.
160 NotificationDisplayService* test_display_service_; 160 NotificationDisplayService* test_display_service_;
161 161
162 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); 162 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl);
163 }; 163 };
164 164
165 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 165 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698