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

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

Issue 2739943006: Do not delete notification ids unknown by the display service (Closed)
Patch Set: keep conent/test/* files Created 3 years, 9 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"
18 19
19 namespace content { 20 namespace content {
20 21
21 struct LayoutTestPermissionManager::Subscription { 22 struct LayoutTestPermissionManager::Subscription {
22 PermissionDescription permission; 23 PermissionDescription permission;
23 base::Callback<void(blink::mojom::PermissionStatus)> callback; 24 base::Callback<void(blink::mojom::PermissionStatus)> callback;
24 blink::mojom::PermissionStatus current_value; 25 blink::mojom::PermissionStatus current_value;
25 }; 26 };
26 27
27 LayoutTestPermissionManager::PermissionDescription::PermissionDescription( 28 LayoutTestPermissionManager::PermissionDescription::PermissionDescription(
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // 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
212 // prevent re-entrance issues. 213 // prevent re-entrance issues.
213 callbacks.push_back(base::Bind(subscription->callback, status)); 214 callbacks.push_back(base::Bind(subscription->callback, status));
214 } 215 }
215 216
216 for (const auto& callback : callbacks) 217 for (const auto& callback : callbacks)
217 callback.Run(); 218 callback.Run();
218 } 219 }
219 220
220 } // 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