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

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

Issue 130253002: Attempt to fixed crash on stop mirroring by stopping render thread on a worker thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_RENDERER_HOST_VIDEO_CAPTURE_DEVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_VIDEO_CAPTURE_DEVICE_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_VIDEO_CAPTURE_DEVICE_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_VIDEO_CAPTURE_DEVICE_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // This should only be checked on the UI thread. 113 // This should only be checked on the UI thread.
114 bool started() const { return started_; } 114 bool started() const { return started_; }
115 115
116 // Starts capturing. Returns true if succeeded. 116 // Starts capturing. Returns true if succeeded.
117 // Must be run on the UI BrowserThread. 117 // Must be run on the UI BrowserThread.
118 virtual bool Start( 118 virtual bool Start(
119 const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy) = 0; 119 const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy) = 0;
120 120
121 // Stops capturing. Must be run on the UI BrowserThread. 121 // Stops capturing. Must be run on the UI BrowserThread.
122 virtual void Stop() = 0; 122 // |callback| is invoked after the capturing has stopped.
123 virtual void Stop(const base::Closure& callback) = 0;
123 124
124 protected: 125 protected:
125 bool started_; 126 bool started_;
126 127
127 private: 128 private:
128 DISALLOW_COPY_AND_ASSIGN(VideoCaptureMachine); 129 DISALLOW_COPY_AND_ASSIGN(VideoCaptureMachine);
129 }; 130 };
130 131
131 // The "meat" of the video capture implementation. 132 // The "meat" of the video capture implementation.
132 // 133 //
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // system with direct access to |client_|. 183 // system with direct access to |client_|.
183 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_; 184 scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_;
184 185
185 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceImpl); 186 DISALLOW_COPY_AND_ASSIGN(VideoCaptureDeviceImpl);
186 }; 187 };
187 188
188 189
189 } // namespace content 190 } // namespace content
190 191
191 #endif // CONTENT_BROWSER_RENDERER_HOST_VIDEO_CAPTURE_DEVICE_IMPL_H_ 192 #endif // CONTENT_BROWSER_RENDERER_HOST_VIDEO_CAPTURE_DEVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698