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

Side by Side Diff: webrtc/modules/desktop_capture/desktop_capturer.h

Issue 1861893002: Fix screen capturers to initialize on the same thread on which Start() is called. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.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 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 15 matching lines...) Expand all
26 class DesktopCapturer { 26 class DesktopCapturer {
27 public: 27 public:
28 // Interface that must be implemented by the DesktopCapturer consumers. 28 // Interface that must be implemented by the DesktopCapturer consumers.
29 class Callback { 29 class Callback {
30 public: 30 public:
31 // Deprecated. 31 // Deprecated.
32 // TODO(sergeyu): Remove this method once all references to it are removed 32 // TODO(sergeyu): Remove this method once all references to it are removed
33 // from chromium. 33 // from chromium.
34 virtual SharedMemory* CreateSharedMemory(size_t size) { return nullptr; } 34 virtual SharedMemory* CreateSharedMemory(size_t size) { return nullptr; }
35 35
36 // Called to notify that the capturer has failed to initialize.
37 virtual void OnInitializationFailed() {};
38
36 // Called after a frame has been captured. Handler must take ownership of 39 // Called after a frame has been captured. Handler must take ownership of
37 // |frame|. If capture has failed for any reason |frame| is set to NULL 40 // |frame|. If capture has failed for any reason |frame| is set to NULL
38 // (e.g. the window has been closed). 41 // (e.g. the window has been closed).
39 virtual void OnCaptureCompleted(DesktopFrame* frame) = 0; 42 virtual void OnCaptureCompleted(DesktopFrame* frame) = 0;
40 43
41 protected: 44 protected:
42 virtual ~Callback() {} 45 virtual ~Callback() {}
43 }; 46 };
44 47
45 virtual ~DesktopCapturer() {} 48 virtual ~DesktopCapturer() {}
(...skipping 20 matching lines...) Expand all
66 // Sets the window to be excluded from the captured image in the future 69 // Sets the window to be excluded from the captured image in the future
67 // Capture calls. Used to exclude the screenshare notification window for 70 // Capture calls. Used to exclude the screenshare notification window for
68 // screen capturing. 71 // screen capturing.
69 virtual void SetExcludedWindow(WindowId window) {} 72 virtual void SetExcludedWindow(WindowId window) {}
70 }; 73 };
71 74
72 } // namespace webrtc 75 } // namespace webrtc
73 76
74 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_ 77 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURER_H_
75 78
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698