Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/media/media_stream_devices_controller.cc

Issue 430813004: Componentize content_settings_provider.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/prefs/scoped_user_pref_update.h" 10 #include "base/prefs/scoped_user_pref_update.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/content_settings/content_settings_provider.h"
14 #include "chrome/browser/content_settings/host_content_settings_map.h" 13 #include "chrome/browser/content_settings/host_content_settings_map.h"
15 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 14 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
16 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 15 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
17 #include "chrome/browser/media/media_stream_capture_indicator.h" 16 #include "chrome/browser/media/media_stream_capture_indicator.h"
18 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
20 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/content_settings.h" 20 #include "chrome/common/content_settings.h"
22 #include "chrome/common/content_settings_pattern.h" 21 #include "chrome/common/content_settings_pattern.h"
23 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "components/content_settings/core/browser/content_settings_provider.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/generated_resources.h" 29 #include "grit/generated_resources.h"
30 #include "grit/theme_resources.h" 30 #include "grit/theme_resources.h"
31 #include "ui/base/l10n/l10n_util.h" 31 #include "ui/base/l10n/l10n_util.h"
32 32
33 #if defined(OS_CHROMEOS) 33 #if defined(OS_CHROMEOS)
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 676 }
677 677
678 bool MediaStreamDevicesController::IsCaptureDeviceRequestAllowed() const { 678 bool MediaStreamDevicesController::IsCaptureDeviceRequestAllowed() const {
679 #if defined(OS_ANDROID) 679 #if defined(OS_ANDROID)
680 // Don't approve device requests if the tab was hidden. 680 // Don't approve device requests if the tab was hidden.
681 // TODO(qinmin): Add a test for this. http://crbug.com/396869. 681 // TODO(qinmin): Add a test for this. http://crbug.com/396869.
682 return web_contents_->GetRenderWidgetHostView()->IsShowing(); 682 return web_contents_->GetRenderWidgetHostView()->IsShowing();
683 #endif 683 #endif
684 return true; 684 return true;
685 } 685 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698