Daniel d'Andrada | 6ac3d85 | 2023-03-27 16:05:31 | [diff] [blame] | 1 | // Copyright 2023 The Chromium Authors |
| 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_SMART_CARD_CHROMEOS_SMART_CARD_DELEGATE_H_ |
| 6 | #define CHROME_BROWSER_SMART_CARD_CHROMEOS_SMART_CARD_DELEGATE_H_ |
| 7 | |
| 8 | #include "content/public/browser/smart_card_delegate.h" |
| 9 | |
| 10 | class ChromeOsSmartCardDelegate : public content::SmartCardDelegate { |
| 11 | public: |
| 12 | ChromeOsSmartCardDelegate(); |
Daniel d'Andrada | d6cd88f | 2023-12-12 14:35:51 | [diff] [blame] | 13 | ~ChromeOsSmartCardDelegate() override; |
Daniel d'Andrada | 6ac3d85 | 2023-03-27 16:05:31 | [diff] [blame] | 14 | |
| 15 | // `content::SmartCardDelegate` overrides: |
| 16 | mojo::PendingRemote<device::mojom::SmartCardContextFactory> |
| 17 | GetSmartCardContextFactory(content::BrowserContext& browser_context) override; |
Daniel d'Andrada | 553de6f | 2024-01-24 11:21:15 | [diff] [blame] | 18 | bool IsPermissionBlocked( |
| 19 | content::RenderFrameHost& render_frame_host) override; |
Daniel d'Andrada | 8153e72 | 2023-11-15 10:54:09 | [diff] [blame] | 20 | bool HasReaderPermission(content::RenderFrameHost& render_frame_host, |
| 21 | const std::string& reader_name) override; |
| 22 | void RequestReaderPermission( |
| 23 | content::RenderFrameHost& render_frame_host, |
| 24 | const std::string& reader_name, |
| 25 | RequestReaderPermissionCallback callback) override; |
Luke Klimek | 288960b | 2025-02-19 13:43:22 | [diff] [blame] | 26 | |
| 27 | void NotifyConnectionUsed( |
| 28 | content::RenderFrameHost& render_frame_host) override; |
| 29 | void NotifyLastConnectionLost( |
| 30 | content::RenderFrameHost& render_frame_host) override; |
Luke Klimek | 4a6b0ff | 2025-03-12 05:01:30 | [diff] [blame] | 31 | |
| 32 | void AddObserver(content::RenderFrameHost& render_frame_host, |
| 33 | PermissionObserver* observer) override; |
| 34 | void RemoveObserver(content::RenderFrameHost& render_frame_host, |
| 35 | PermissionObserver* observer) override; |
Daniel d'Andrada | 6ac3d85 | 2023-03-27 16:05:31 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | #endif // CHROME_BROWSER_SMART_CARD_CHROMEOS_SMART_CARD_DELEGATE_H_ |