blob: ff10a12645f9248c7c4f1f1f8e2380ce839cdbd2 [file] [log] [blame]
Sam Goto366a1d92019-01-18 21:47:351// Copyright 2018 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
5#ifndef CHROME_BROWSER_IDLE_IDLE_DETECTION_PERMISSION_CONTEXT_H_
6#define CHROME_BROWSER_IDLE_IDLE_DETECTION_PERMISSION_CONTEXT_H_
7
8#include "base/macros.h"
9#include "chrome/browser/permissions/permission_context_base.h"
10
11class IdleDetectionPermissionContext : public PermissionContextBase {
12 public:
13 explicit IdleDetectionPermissionContext(Profile* profile);
14 ~IdleDetectionPermissionContext() override;
15
16 private:
17 // PermissionContextBase:
18 void UpdateTabContext(const PermissionRequestID& id,
19 const GURL& requesting_frame,
20 bool allowed) override;
21 ContentSetting GetPermissionStatusInternal(
22 content::RenderFrameHost* render_frame_host,
23 const GURL& requesting_origin,
24 const GURL& embedding_origin) const override;
25 bool IsRestrictedToSecureOrigins() const override;
26
27 DISALLOW_COPY_AND_ASSIGN(IdleDetectionPermissionContext);
28};
29
30#endif // CHROME_BROWSER_IDLE_IDLE_DETECTION_PERMISSION_CONTEXT_H_