summaryrefslogtreecommitdiff
path: root/chromium/weblayer/browser/content_settings_manager_delegate.h
blob: f963a7d63c1e16e21d868dd9e3a93dec5aaa81ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBLAYER_BROWSER_CONTENT_SETTINGS_MANAGER_DELEGATE_H_
#define WEBLAYER_BROWSER_CONTENT_SETTINGS_MANAGER_DELEGATE_H_

#include "components/content_settings/browser/content_settings_manager_impl.h"

namespace weblayer {

class ContentSettingsManagerDelegate
    : public content_settings::ContentSettingsManagerImpl::Delegate {
 public:
  ContentSettingsManagerDelegate();
  ~ContentSettingsManagerDelegate() override;

 private:
  // content_settings::ContentSettingsManagerImpl::Delegate:
  scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
      content::BrowserContext* browser_context) override;
  bool AllowStorageAccess(
      int render_process_id,
      int render_frame_id,
      content_settings::mojom::ContentSettingsManager::StorageType storage_type,
      const GURL& url,
      bool allowed,
      base::OnceCallback<void(bool)>* callback) override;
  std::unique_ptr<Delegate> Clone() override;
};

}  // namespace weblayer

#endif  // WEBLAYER_BROWSER_CONTENT_SETTINGS_MANAGER_DELEGATE_H_