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_permission_manager.cc

Issue 2868793003: RE-add the ability to delete notification ids unknown by the display service. (Closed)
Patch Set: Created 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_permission_manager.h" 5 #include "content/shell/browser/layout_test/layout_test_permission_manager.h"
6 6
7 #include <list> 7 #include <list>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/permission_type.h" 15 #include "content/public/browser/permission_type.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h " 17 #include "content/shell/browser/layout_test/layout_test_content_browser_client.h "
18 #include "content/shell/browser/layout_test/layout_test_notification_manager.h"
19 18
20 namespace content { 19 namespace content {
21 20
22 struct LayoutTestPermissionManager::Subscription { 21 struct LayoutTestPermissionManager::Subscription {
23 PermissionDescription permission; 22 PermissionDescription permission;
24 base::Callback<void(blink::mojom::PermissionStatus)> callback; 23 base::Callback<void(blink::mojom::PermissionStatus)> callback;
25 blink::mojom::PermissionStatus current_value; 24 blink::mojom::PermissionStatus current_value;
26 }; 25 };
27 26
28 LayoutTestPermissionManager::PermissionDescription::PermissionDescription( 27 LayoutTestPermissionManager::PermissionDescription::PermissionDescription(
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Add the callback to |callbacks| which will be run after the loop to 212 // Add the callback to |callbacks| which will be run after the loop to
214 // prevent re-entrance issues. 213 // prevent re-entrance issues.
215 callbacks.push_back(base::Bind(subscription->callback, status)); 214 callbacks.push_back(base::Bind(subscription->callback, status));
216 } 215 }
217 216
218 for (const auto& callback : callbacks) 217 for (const auto& callback : callbacks)
219 callback.Run(); 218 callback.Run();
220 } 219 }
221 220
222 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/layout_test/layout_test_notification_manager.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698