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/media/permission_bubble_media_access_handler.h" | 5 #include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "chrome/browser/media/media_permission.h" | 10 #include "chrome/browser/media/webrtc/media_permission.h" |
11 #include "chrome/browser/media/media_stream_device_permissions.h" | 11 #include "chrome/browser/media/webrtc/media_stream_device_permissions.h" |
12 #include "chrome/browser/media/media_stream_devices_controller.h" | 12 #include "chrome/browser/media/webrtc/media_stream_devices_controller.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/features.h" | 14 #include "chrome/common/features.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "components/content_settings/core/browser/host_content_settings_map.h" | 16 #include "components/content_settings/core/browser/host_content_settings_map.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
19 #include "content/public/browser/notification_types.h" | 19 #include "content/public/browser/notification_types.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 | 21 |
22 #if BUILDFLAG(ANDROID_JAVA_UI) | 22 #if BUILDFLAG(ANDROID_JAVA_UI) |
23 #include <vector> | 23 #include <vector> |
24 | 24 |
25 #include "base/bind.h" | 25 #include "base/bind.h" |
26 #include "base/bind_helpers.h" | 26 #include "base/bind_helpers.h" |
27 #include "chrome/browser/media/media_stream_infobar_delegate_android.h" | 27 #include "chrome/browser/media/webrtc/media_stream_infobar_delegate_android.h" |
28 #include "chrome/browser/permissions/permission_update_infobar_delegate_android.
h" | 28 #include "chrome/browser/permissions/permission_update_infobar_delegate_android.
h" |
29 #else | 29 #else |
30 #include "chrome/browser/permissions/permission_request_manager.h" | 30 #include "chrome/browser/permissions/permission_request_manager.h" |
31 #endif // BUILDFLAG(ANDROID_JAVA_UI) | 31 #endif // BUILDFLAG(ANDROID_JAVA_UI) |
32 | 32 |
33 #if BUILDFLAG(ANDROID_JAVA_UI) | 33 #if BUILDFLAG(ANDROID_JAVA_UI) |
34 namespace { | 34 namespace { |
35 // Callback for the permission update infobar when the site and Chrome | 35 // Callback for the permission update infobar when the site and Chrome |
36 // permissions are mismatched on Android. | 36 // permissions are mismatched on Android. |
37 void OnPermissionConflictResolved( | 37 void OnPermissionConflictResolved( |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 void PermissionBubbleMediaAccessHandler::Observe( | 236 void PermissionBubbleMediaAccessHandler::Observe( |
237 int type, | 237 int type, |
238 const content::NotificationSource& source, | 238 const content::NotificationSource& source, |
239 const content::NotificationDetails& details) { | 239 const content::NotificationDetails& details) { |
240 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 240 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
241 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, type); | 241 DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, type); |
242 | 242 |
243 pending_requests_.erase(content::Source<content::WebContents>(source).ptr()); | 243 pending_requests_.erase(content::Source<content::WebContents>(source).ptr()); |
244 } | 244 } |
OLD | NEW |