cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / extensions / browser / api / webcam_private / v4l2_webcam.h
blob595961b987614ab874461850bd0efd4f9a46794a
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 bool Open();
19 private:
20 ~V4L2Webcam() override;
21 bool EnsureLogitechCommandsMapped();
22 bool SetWebcamParameter(int fd, uint32_t control_id, int value);
23 bool GetWebcamParameter(int fd, uint32_t control_id, int* value);
25 // Webcam:
26 void GetPan(const GetPTZCompleteCallback& callback) override;
27 void GetTilt(const GetPTZCompleteCallback& callback) override;
28 void GetZoom(const GetPTZCompleteCallback& callback) override;
29 void SetPan(int value,
30 int pan_speed,
31 const SetPTZCompleteCallback& callback) override;
32 void SetTilt(int value,
33 int tilt_speed,
34 const SetPTZCompleteCallback& callback) override;
35 void SetZoom(int value, const SetPTZCompleteCallback& callback) override;
36 void SetPanDirection(PanDirection direction,
37 int pan_speed,
38 const SetPTZCompleteCallback& callback) override;
39 void SetTiltDirection(TiltDirection direction,
40 int tilt_speed,
41 const SetPTZCompleteCallback& callback) override;
42 void Reset(bool pan,
43 bool tilt,
44 bool zoom,
45 const SetPTZCompleteCallback& callback) override;
47 const std::string device_id_;
48 base::ScopedFD fd_;
50 DISALLOW_COPY_AND_ASSIGN(V4L2Webcam);
54 } // namespace extensions
56 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_V4L2_WEBCAM_H_