Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / extensions / browser / api / webcam_private / webcam.h
blobc85e75f364d6c9d3bbf773ed67ef929ab0c486cc
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_WEBCAM_H_
6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_H_
8 #include <set>
9 #include <string>
11 #include "base/macros.h"
13 namespace extensions {
15 class Webcam {
16 public:
17 enum PanDirection {
18 PAN_LEFT,
19 PAN_RIGHT,
20 PAN_STOP,
23 enum TiltDirection {
24 TILT_UP,
25 TILT_DOWN,
26 TILT_STOP,
29 Webcam();
30 virtual ~Webcam();
32 virtual void Reset(bool pan, bool tilt, bool zoom) = 0;
33 virtual bool GetPan(int* value) = 0;
34 virtual bool GetTilt(int* value) = 0;
35 virtual bool GetZoom(int* value) = 0;
36 virtual bool SetPan(int value) = 0;
37 virtual bool SetTilt(int value) = 0;
38 virtual bool SetZoom(int value) = 0;
39 virtual bool SetPanDirection(PanDirection direction) = 0;
40 virtual bool SetTiltDirection(TiltDirection direction) = 0;
42 void AddExtensionRef(const std::string& extension_id) {
43 extension_refs_.insert(extension_id);
46 void RemoveExtensionRef(const std::string& extension_id) {
47 extension_refs_.erase(extension_id);
50 bool ShouldDelete() {
51 return extension_refs_.empty();
54 private:
55 std::set<std::string> extension_refs_;
57 DISALLOW_COPY_AND_ASSIGN(Webcam);
60 } // namespace extensions
62 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_WEBCAM_H_