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 <stddef.h> |
| 8 |
7 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "build/build_config.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 11 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
9 #include "chrome/browser/permissions/permission_context.h" | 12 #include "chrome/browser/permissions/permission_context.h" |
10 #include "chrome/browser/permissions/permission_context_base.h" | 13 #include "chrome/browser/permissions/permission_context_base.h" |
11 #include "chrome/browser/permissions/permission_request_id.h" | 14 #include "chrome/browser/permissions/permission_request_id.h" |
12 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/tab_contents/tab_util.h" | 16 #include "chrome/browser/tab_contents/tab_util.h" |
14 #include "components/content_settings/core/browser/host_content_settings_map.h" | 17 #include "components/content_settings/core/browser/host_content_settings_map.h" |
15 #include "content/public/browser/permission_type.h" | 18 #include "content/public/browser/permission_type.h" |
16 #include "content/public/browser/render_frame_host.h" | 19 #include "content/public/browser/render_frame_host.h" |
17 #include "content/public/browser/render_process_host.h" | 20 #include "content/public/browser/render_process_host.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // Add the callback to |callbacks| which will be run after the loop to | 424 // Add the callback to |callbacks| which will be run after the loop to |
422 // prevent re-entrance issues. | 425 // prevent re-entrance issues. |
423 callbacks.push_back( | 426 callbacks.push_back( |
424 base::Bind(subscription->callback, | 427 base::Bind(subscription->callback, |
425 ContentSettingToPermissionStatus(new_value))); | 428 ContentSettingToPermissionStatus(new_value))); |
426 } | 429 } |
427 | 430 |
428 for (const auto& callback : callbacks) | 431 for (const auto& callback : callbacks) |
429 callback.Run(); | 432 callback.Run(); |
430 } | 433 } |
OLD | NEW |