OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/media_stream_devices_controller.h" | 5 #include "chrome/browser/media/media_stream_devices_controller.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/prefs/scoped_user_pref_update.h" | 8 #include "base/prefs/scoped_user_pref_update.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/content_settings/content_settings_provider.h" | |
12 #include "chrome/browser/content_settings/host_content_settings_map.h" | 11 #include "chrome/browser/content_settings/host_content_settings_map.h" |
13 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
14 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 13 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
15 #include "chrome/browser/media/media_stream_capture_indicator.h" | 14 #include "chrome/browser/media/media_stream_capture_indicator.h" |
16 #include "chrome/browser/media/media_stream_device_permissions.h" | 15 #include "chrome/browser/media/media_stream_device_permissions.h" |
17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
21 #include "chrome/grit/generated_resources.h" | 20 #include "chrome/grit/generated_resources.h" |
| 21 #include "components/content_settings/core/browser/content_settings_provider.h" |
22 #include "components/content_settings/core/common/content_settings.h" | 22 #include "components/content_settings/core/common/content_settings.h" |
23 #include "components/content_settings/core/common/content_settings_pattern.h" | 23 #include "components/content_settings/core/common/content_settings_pattern.h" |
24 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/render_widget_host_view.h" | 26 #include "content/public/browser/render_widget_host_view.h" |
27 #include "content/public/common/media_stream_request.h" | 27 #include "content/public/common/media_stream_request.h" |
28 #include "extensions/common/constants.h" | 28 #include "extensions/common/constants.h" |
29 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 | 31 |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 } | 617 } |
618 | 618 |
619 bool MediaStreamDevicesController::IsCaptureDeviceRequestAllowed() const { | 619 bool MediaStreamDevicesController::IsCaptureDeviceRequestAllowed() const { |
620 #if defined(OS_ANDROID) | 620 #if defined(OS_ANDROID) |
621 // Don't approve device requests if the tab was hidden. | 621 // Don't approve device requests if the tab was hidden. |
622 // TODO(qinmin): Add a test for this. http://crbug.com/396869. | 622 // TODO(qinmin): Add a test for this. http://crbug.com/396869. |
623 return web_contents_->GetRenderWidgetHostView()->IsShowing(); | 623 return web_contents_->GetRenderWidgetHostView()->IsShowing(); |
624 #endif | 624 #endif |
625 return true; | 625 return true; |
626 } | 626 } |
OLD | NEW |