| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/media/protected_media_identifier_permission_context.h" | 5 #include "chrome/browser/media/protected_media_identifier_permission_context.h" |
| 6 | 6 |
| 7 #include <functional> | 7 #include <functional> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/content_settings/host_content_settings_map.h" | 13 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 14 #include "chrome/browser/content_settings/permission_request_id.h" | 14 #include "chrome/browser/content_settings/permission_request_id.h" |
| 15 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 15 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 16 #include "chrome/browser/extensions/extension_service.h" | 16 #include "chrome/browser/extensions/extension_service.h" |
| 17 #include "chrome/browser/extensions/extension_system.h" | 17 #include "chrome/browser/extensions/extension_system.h" |
| 18 #include "chrome/browser/extensions/suggest_permission_util.h" | 18 #include "chrome/browser/extensions/suggest_permission_util.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/tab_contents/tab_util.h" | 20 #include "chrome/browser/tab_contents/tab_util.h" |
| 21 #include "chrome/common/extensions/extension.h" | |
| 22 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 23 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/render_view_host.h" | 23 #include "content/public/browser/render_view_host.h" |
| 25 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
| 26 #include "extensions/browser/view_type_utils.h" | 25 #include "extensions/browser/view_type_utils.h" |
| 26 #include "extensions/common/extension.h" |
| 27 | 27 |
| 28 using extensions::APIPermission; | 28 using extensions::APIPermission; |
| 29 | 29 |
| 30 ProtectedMediaIdentifierPermissionContext:: | 30 ProtectedMediaIdentifierPermissionContext:: |
| 31 ProtectedMediaIdentifierPermissionContext(Profile* profile) | 31 ProtectedMediaIdentifierPermissionContext(Profile* profile) |
| 32 : profile_(profile), shutting_down_(false) {} | 32 : profile_(profile), shutting_down_(false) {} |
| 33 | 33 |
| 34 ProtectedMediaIdentifierPermissionContext:: | 34 ProtectedMediaIdentifierPermissionContext:: |
| 35 ~ProtectedMediaIdentifierPermissionContext() { | 35 ~ProtectedMediaIdentifierPermissionContext() { |
| 36 // ProtectedMediaIdentifierPermissionContext may be destroyed on either | 36 // ProtectedMediaIdentifierPermissionContext may be destroyed on either |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 CancelPendingInfoBarRequest, | 196 CancelPendingInfoBarRequest, |
| 197 this, | 197 this, |
| 198 id)); | 198 id)); |
| 199 return; | 199 return; |
| 200 } | 200 } |
| 201 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 201 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 202 if (shutting_down_) | 202 if (shutting_down_) |
| 203 return; | 203 return; |
| 204 QueueController()->CancelInfoBarRequest(id); | 204 QueueController()->CancelInfoBarRequest(id); |
| 205 } | 205 } |
| OLD | NEW |