OLD | NEW |
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 "chrome/browser/permissions/permission_manager.h" | 5 #include "chrome/browser/permissions/permission_manager.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "chrome/browser/content_settings/permission_context_base.h" | 8 #include "chrome/browser/content_settings/permission_context_base.h" |
9 #include "chrome/browser/permissions/permission_context.h" | 9 #include "chrome/browser/permissions/permission_context.h" |
| 10 #include "chrome/browser/permissions/permission_request_id.h" |
10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
11 #include "components/content_settings/core/browser/host_content_settings_map.h" | 12 #include "components/content_settings/core/browser/host_content_settings_map.h" |
12 #include "components/content_settings/core/common/permission_request_id.h" | |
13 #include "content/public/browser/permission_type.h" | 13 #include "content/public/browser/permission_type.h" |
14 #include "content/public/browser/render_frame_host.h" | 14 #include "content/public/browser/render_frame_host.h" |
15 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 | 17 |
18 using content::PermissionStatus; | 18 using content::PermissionStatus; |
19 using content::PermissionType; | 19 using content::PermissionType; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // Add the callback to |callbacks| which will be run after the loop to | 237 // Add the callback to |callbacks| which will be run after the loop to |
238 // prevent re-entrance issues. | 238 // prevent re-entrance issues. |
239 callbacks.push_back( | 239 callbacks.push_back( |
240 base::Bind(subscription->callback, | 240 base::Bind(subscription->callback, |
241 ContentSettingToPermissionStatus(new_value))); | 241 ContentSettingToPermissionStatus(new_value))); |
242 } | 242 } |
243 | 243 |
244 for (const auto& callback : callbacks) | 244 for (const auto& callback : callbacks) |
245 callback.Run(); | 245 callback.Run(); |
246 } | 246 } |
OLD | NEW |