test_page_specific_content_settings_delegate.cc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/content_settings/browser/test_page_specific_content_settings_delegate.h"
  5. #include "base/callback_helpers.h"
  6. namespace content_settings {
  7. TestPageSpecificContentSettingsDelegate::
  8. TestPageSpecificContentSettingsDelegate(
  9. PrefService* prefs,
  10. HostContentSettingsMap* settings_map)
  11. : prefs_(prefs), settings_map_(settings_map) {}
  12. TestPageSpecificContentSettingsDelegate::
  13. ~TestPageSpecificContentSettingsDelegate() = default;
  14. void TestPageSpecificContentSettingsDelegate::UpdateLocationBar() {}
  15. PrefService* TestPageSpecificContentSettingsDelegate::GetPrefs() {
  16. return prefs_;
  17. }
  18. HostContentSettingsMap*
  19. TestPageSpecificContentSettingsDelegate::GetSettingsMap() {
  20. return settings_map_.get();
  21. }
  22. void TestPageSpecificContentSettingsDelegate::
  23. SetDefaultRendererContentSettingRules(content::RenderFrameHost* rfh,
  24. RendererContentSettingRules* rules) {}
  25. std::vector<storage::FileSystemType>
  26. TestPageSpecificContentSettingsDelegate::GetAdditionalFileSystemTypes() {
  27. return {};
  28. }
  29. browsing_data::CookieHelper::IsDeletionDisabledCallback
  30. TestPageSpecificContentSettingsDelegate::GetIsDeletionDisabledCallback() {
  31. return base::NullCallback();
  32. }
  33. bool TestPageSpecificContentSettingsDelegate::IsMicrophoneCameraStateChanged(
  34. PageSpecificContentSettings::MicrophoneCameraState microphone_camera_state,
  35. const std::string& media_stream_selected_audio_device,
  36. const std::string& media_stream_selected_video_device) {
  37. return false;
  38. }
  39. PageSpecificContentSettings::MicrophoneCameraState
  40. TestPageSpecificContentSettingsDelegate::GetMicrophoneCameraState() {
  41. return PageSpecificContentSettings::MICROPHONE_CAMERA_NOT_ACCESSED;
  42. }
  43. void TestPageSpecificContentSettingsDelegate::OnContentAllowed(
  44. ContentSettingsType type) {}
  45. void TestPageSpecificContentSettingsDelegate::OnContentBlocked(
  46. ContentSettingsType type) {}
  47. void TestPageSpecificContentSettingsDelegate::OnStorageAccessAllowed(
  48. content_settings::mojom::ContentSettingsManager::StorageType storage_type,
  49. const url::Origin& origin,
  50. content::Page& page) {}
  51. void TestPageSpecificContentSettingsDelegate::OnCookieAccessAllowed(
  52. const net::CookieList& accessed_cookies,
  53. content::Page& page) {}
  54. void TestPageSpecificContentSettingsDelegate::OnServiceWorkerAccessAllowed(
  55. const url::Origin& origin,
  56. content::Page& page) {}
  57. } // namespace content_settings