Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / extensions / browser / api / webcam_private / v4l2_webcam.h
blob53efcfceb18f19dea922a709c751a64b624889f6
1 // Copyright 2015 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.
5 #ifndef EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_
6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_
8 #include "extensions/browser/api/webcam_private/webcam.h"
10 #include "base/files/scoped_file.h"
12 namespace extensions {
14 class V4L2Webcam : public Webcam {
15 public:
16 V4L2Webcam(const std::string& device_id);
17 ~V4L2Webcam() override;
19 bool Open();
21 private:
22 bool EnsureLogitechCommandsMapped();
23 bool SetWebcamParameter(int fd, uint32_t control_id, int value);
24 bool GetWebcamParameter(int fd, uint32_t control_id, int* value);
26 // Webcam:
27 void Reset(bool pan, bool tilt, bool zoom) override;
28 bool GetPan(int* value) override;
29 bool GetTilt(int* value) override;
30 bool GetZoom(int* value) override;
31 bool SetPan(int value) override;
32 bool SetTilt(int value) override;
33 bool SetZoom(int value) override;
34 bool SetPanDirection(PanDirection direction) override;
35 bool SetTiltDirection(TiltDirection direction) override;
37 const std::string device_id_;
38 base::ScopedFD fd_;
40 DISALLOW_COPY_AND_ASSIGN(V4L2Webcam);
44 } // namespace extensions
46 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_