Francois Beaufort | 51f9ee3 | 2019-11-05 06:48:16 | [diff] [blame] | 1 | // Copyright 2019 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_NFC_NFC_PERMISSION_CONTEXT_H_ |
| 6 | #define CHROME_BROWSER_NFC_NFC_PERMISSION_CONTEXT_H_ |
| 7 | |
| 8 | #include "chrome/browser/permissions/permission_context_base.h" |
| 9 | |
| 10 | class NfcPermissionContext : public PermissionContextBase { |
| 11 | public: |
| 12 | explicit NfcPermissionContext(Profile* profile); |
| 13 | |
| 14 | NfcPermissionContext(const NfcPermissionContext&) = delete; |
| 15 | NfcPermissionContext& operator=(const NfcPermissionContext&) = delete; |
| 16 | |
| 17 | ~NfcPermissionContext() override; |
| 18 | |
| 19 | private: |
| 20 | // PermissionContextBase: |
Francois Beaufort | dbb86fd | 2019-11-22 14:29:09 | [diff] [blame^] | 21 | #if !defined(OS_ANDROID) |
Francois Beaufort | 51f9ee3 | 2019-11-05 06:48:16 | [diff] [blame] | 22 | ContentSetting GetPermissionStatusInternal( |
| 23 | content::RenderFrameHost* render_frame_host, |
| 24 | const GURL& requesting_origin, |
| 25 | const GURL& embedding_origin) const override; |
Francois Beaufort | dbb86fd | 2019-11-22 14:29:09 | [diff] [blame^] | 26 | #endif |
Francois Beaufort | 51f9ee3 | 2019-11-05 06:48:16 | [diff] [blame] | 27 | void DecidePermission(content::WebContents* web_contents, |
| 28 | const PermissionRequestID& id, |
| 29 | const GURL& requesting_origin, |
| 30 | const GURL& embedding_origin, |
| 31 | bool user_gesture, |
| 32 | BrowserPermissionCallback callback) override; |
| 33 | void UpdateTabContext(const PermissionRequestID& id, |
| 34 | const GURL& requesting_frame, |
| 35 | bool allowed) override; |
| 36 | bool IsRestrictedToSecureOrigins() const override; |
| 37 | }; |
| 38 | |
| 39 | #endif // CHROME_BROWSER_NFC_NFC_PERMISSION_CONTEXT_H_ |