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

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

Issue 2908133003: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker
Patch Set: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker 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
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 "content/public/browser/permission_type.h" 7 #include "content/public/browser/permission_type.h"
8 #include "content/shell/browser/layout_test/layout_test_browser_context.h" 8 #include "content/shell/browser/layout_test/layout_test_browser_context.h"
9 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h " 9 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h "
10 #include "content/shell/browser/layout_test/layout_test_permission_manager.h" 10 #include "content/shell/browser/layout_test/layout_test_permission_manager.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 LayoutTestNotificationManager::LayoutTestNotificationManager() {} 14 LayoutTestNotificationManager::LayoutTestNotificationManager() {}
15 LayoutTestNotificationManager::~LayoutTestNotificationManager() {} 15 LayoutTestNotificationManager::~LayoutTestNotificationManager() {}
16 16
17 17
18 blink::mojom::PermissionStatus 18 blink::mojom::PermissionStatus
19 LayoutTestNotificationManager::CheckPermission(const GURL& origin) { 19 LayoutTestNotificationManager::CheckPermission(const GURL& origin) {
20 // This may be called for checking the permission for both a frame or a worker
21 // however, since notifications can be used equally from frames/workers it's
22 // sufficient just to check that whether it's available in the worker.
20 return LayoutTestContentBrowserClient::Get() 23 return LayoutTestContentBrowserClient::Get()
21 ->GetLayoutTestBrowserContext() 24 ->GetLayoutTestBrowserContext()
22 ->GetLayoutTestPermissionManager() 25 ->GetLayoutTestPermissionManager()
23 ->GetPermissionStatus(PermissionType::NOTIFICATIONS, 26 ->GetPermissionStatusForWorker(PermissionType::NOTIFICATIONS, origin);
24 origin,
25 origin);
26 } 27 }
27 28
28 } // namespace content 29 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698