Sam Goto | 366a1d9 | 2019-01-18 21:47:35 | [diff] [blame] | 1 | // 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 | |
| 11 | class 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_ |