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

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

Issue 2151993002: [WebAPKs] Plumb service worker scope to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into notification_scope Created 4 years, 5 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
« no previous file with comments | « content/shell/browser/layout_test/layout_test_notification_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/shell/browser/layout_test/layout_test_notification_manager.h" 5 #include "content/shell/browser/layout_test/layout_test_notification_manager.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/desktop_notification_delegate.h" 10 #include "content/public/browser/desktop_notification_delegate.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 ReplaceNotificationIfNeeded(notification_data); 48 ReplaceNotificationIfNeeded(notification_data);
49 49
50 page_notifications_[title] = delegate.release(); 50 page_notifications_[title] = delegate.release();
51 page_notifications_[title]->NotificationDisplayed(); 51 page_notifications_[title]->NotificationDisplayed();
52 } 52 }
53 53
54 void LayoutTestNotificationManager::DisplayPersistentNotification( 54 void LayoutTestNotificationManager::DisplayPersistentNotification(
55 BrowserContext* browser_context, 55 BrowserContext* browser_context,
56 int64_t persistent_notification_id, 56 int64_t persistent_notification_id,
57 const GURL& service_worker_scope,
57 const GURL& origin, 58 const GURL& origin,
58 const PlatformNotificationData& notification_data, 59 const PlatformNotificationData& notification_data,
59 const NotificationResources& notification_resources) { 60 const NotificationResources& notification_resources) {
60 DCHECK_CURRENTLY_ON(BrowserThread::UI); 61 DCHECK_CURRENTLY_ON(BrowserThread::UI);
61 std::string title = base::UTF16ToUTF8(notification_data.title); 62 std::string title = base::UTF16ToUTF8(notification_data.title);
62 63
63 ReplaceNotificationIfNeeded(notification_data); 64 ReplaceNotificationIfNeeded(notification_data);
64 65
65 PersistentNotification notification; 66 PersistentNotification notification;
66 notification.browser_context = browser_context; 67 notification.browser_context = browser_context;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 LayoutTestNotificationManager::CheckPermission(const GURL& origin) { 200 LayoutTestNotificationManager::CheckPermission(const GURL& origin) {
200 return LayoutTestContentBrowserClient::Get() 201 return LayoutTestContentBrowserClient::Get()
201 ->GetLayoutTestBrowserContext() 202 ->GetLayoutTestBrowserContext()
202 ->GetLayoutTestPermissionManager() 203 ->GetLayoutTestPermissionManager()
203 ->GetPermissionStatus(PermissionType::NOTIFICATIONS, 204 ->GetPermissionStatus(PermissionType::NOTIFICATIONS,
204 origin, 205 origin,
205 origin); 206 origin);
206 } 207 }
207 208
208 } // namespace content 209 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_notification_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698