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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 2314833002: Remove some uses of stl_util's STLDeleteContainerPointers. (Closed)
Patch Set: cleanup Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // VideoCaptureController is the glue between a VideoCaptureDevice and all 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all
6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of
7 // one (and only one) VideoCaptureDevice; both are owned by the 7 // one (and only one) VideoCaptureDevice; both are owned by the
8 // VideoCaptureManager. 8 // VideoCaptureManager.
9 // 9 //
10 // The VideoCaptureController is responsible for: 10 // The VideoCaptureController is responsible for:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. 128 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
129 virtual void DoIncomingCapturedVideoFrameOnIOThread( 129 virtual void DoIncomingCapturedVideoFrameOnIOThread(
130 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, 130 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
131 const scoped_refptr<media::VideoFrame>& frame); 131 const scoped_refptr<media::VideoFrame>& frame);
132 virtual void DoErrorOnIOThread(); 132 virtual void DoErrorOnIOThread();
133 virtual void DoLogOnIOThread(const std::string& message); 133 virtual void DoLogOnIOThread(const std::string& message);
134 virtual void DoBufferDestroyedOnIOThread(int buffer_id_to_drop); 134 virtual void DoBufferDestroyedOnIOThread(int buffer_id_to_drop);
135 135
136 private: 136 private:
137 struct ControllerClient; 137 struct ControllerClient;
138 typedef std::list<ControllerClient*> ControllerClients; 138 typedef std::list<std::unique_ptr<ControllerClient>> ControllerClients;
139 139
140 // Notify renderer that a new buffer has been created. 140 // Notify renderer that a new buffer has been created.
141 void DoNewBufferOnIOThread(ControllerClient* client, 141 void DoNewBufferOnIOThread(ControllerClient* client,
142 media::VideoCaptureDevice::Client::Buffer* buffer, 142 media::VideoCaptureDevice::Client::Buffer* buffer,
143 const scoped_refptr<media::VideoFrame>& frame); 143 const scoped_refptr<media::VideoFrame>& frame);
144 144
145 // Find a client of |id| and |handler| in |clients|. 145 // Find a client of |id| and |handler| in |clients|.
146 ControllerClient* FindClient(VideoCaptureControllerID id, 146 ControllerClient* FindClient(VideoCaptureControllerID id,
147 VideoCaptureControllerEventHandler* handler, 147 VideoCaptureControllerEventHandler* handler,
148 const ControllerClients& clients); 148 const ControllerClients& clients);
(...skipping 18 matching lines...) Expand all
167 media::VideoCaptureFormat video_capture_format_; 167 media::VideoCaptureFormat video_capture_format_;
168 168
169 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 169 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
170 170
171 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 171 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
172 }; 172 };
173 173
174 } // namespace content 174 } // namespace content
175 175
176 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 176 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698