Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: extensions/browser/api/webcam_private/visca_webcam.h

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_VISCA_WEBCAM_H_ 5 #ifndef EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_VISCA_WEBCAM_H_
6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_VISCA_WEBCAM_H_ 6 #define EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_VISCA_WEBCAM_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const SetPTZCompleteCallback& callback) override; 107 const SetPTZCompleteCallback& callback) override;
108 void SetTiltDirection(TiltDirection direction, 108 void SetTiltDirection(TiltDirection direction,
109 int tilt_speed, 109 int tilt_speed,
110 const SetPTZCompleteCallback& callback) override; 110 const SetPTZCompleteCallback& callback) override;
111 void Reset(bool pan, 111 void Reset(bool pan,
112 bool tilt, 112 bool tilt,
113 bool zoom, 113 bool zoom,
114 const SetPTZCompleteCallback& callback) override; 114 const SetPTZCompleteCallback& callback) override;
115 115
116 // Used only in unit tests in place of Open(). 116 // Used only in unit tests in place of Open().
117 void OpenForTesting(scoped_ptr<SerialConnection> serial_connection); 117 void OpenForTesting(std::unique_ptr<SerialConnection> serial_connection);
118 118
119 // Used only in unit tests to retrieve |serial_connection_| since this class 119 // Used only in unit tests to retrieve |serial_connection_| since this class
120 // owns it. 120 // owns it.
121 SerialConnection* GetSerialConnectionForTesting(); 121 SerialConnection* GetSerialConnectionForTesting();
122 122
123 scoped_ptr<SerialConnection> serial_connection_; 123 std::unique_ptr<SerialConnection> serial_connection_;
124 124
125 // Stores the response for the current command. 125 // Stores the response for the current command.
126 std::vector<char> data_buffer_; 126 std::vector<char> data_buffer_;
127 127
128 // Queues commands till the current command completes. 128 // Queues commands till the current command completes.
129 std::deque<std::pair<std::vector<char>, CommandCompleteCallback>> commands_; 129 std::deque<std::pair<std::vector<char>, CommandCompleteCallback>> commands_;
130 130
131 // Visca webcam always get/set pan-tilt together. |pan| and |tilt| are used to 131 // Visca webcam always get/set pan-tilt together. |pan| and |tilt| are used to
132 // store the current value of pan and tilt positions. 132 // store the current value of pan and tilt positions.
133 int pan_; 133 int pan_;
134 int tilt_; 134 int tilt_;
135 135
136 base::WeakPtrFactory<ViscaWebcam> weak_ptr_factory_; 136 base::WeakPtrFactory<ViscaWebcam> weak_ptr_factory_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(ViscaWebcam); 138 DISALLOW_COPY_AND_ASSIGN(ViscaWebcam);
139 }; 139 };
140 140
141 } // namespace extensions 141 } // namespace extensions
142 142
143 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_VISCA_WEBCAM_H_ 143 #endif // EXTENSIONS_BROWSER_API_WEBCAM_PRIVATE_VISCA_WEBCAM_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/web_request/web_request_time_tracker.h ('k') | extensions/browser/api/webcam_private/visca_webcam.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698