blob: 1c320c9525ff7198cddfa04d0255f7881af5eef0 [file] [log] [blame]
Reilly Grant0d282322019-01-29 02:42:581// 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_SERIAL_CHROME_SERIAL_DELEGATE_H_
6#define CHROME_BROWSER_SERIAL_CHROME_SERIAL_DELEGATE_H_
7
8#include <memory>
9#include <vector>
10
11#include "content/public/browser/serial_delegate.h"
12
13class ChromeSerialDelegate : public content::SerialDelegate {
14 public:
15 ChromeSerialDelegate();
16 ~ChromeSerialDelegate() override;
17
18 std::unique_ptr<content::SerialChooser> RunChooser(
19 content::RenderFrameHost* frame,
20 std::vector<blink::mojom::SerialPortFilterPtr> filters,
21 content::SerialChooser::Callback callback) override;
Reilly Grant87d6eb022019-04-19 23:55:5922 bool CanRequestPortPermission(content::RenderFrameHost* frame) override;
Reilly Grant0d282322019-01-29 02:42:5823 bool HasPortPermission(content::RenderFrameHost* frame,
24 const device::mojom::SerialPortInfo& port) override;
25 device::mojom::SerialPortManager* GetPortManager(
26 content::RenderFrameHost* frame) override;
27
28 private:
29 DISALLOW_COPY_AND_ASSIGN(ChromeSerialDelegate);
30};
31
32#endif // CHROME_BROWSER_SERIAL_CHROME_SERIAL_DELEGATE_H_