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

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h

Issue 2490063002: Remove ScreenCapturer and WindowCapturer (Closed)
Patch Set: Created 4 years, 1 month 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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
11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ 11 #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ 12 #define WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
13 13
14 #include <memory> 14 #include <memory>
15 15
16 #include <windows.h> 16 #include <windows.h>
17 #include <magnification.h> 17 #include <magnification.h>
18 #include <wincodec.h> 18 #include <wincodec.h>
19 19
20 #include "webrtc/base/constructormagic.h" 20 #include "webrtc/base/constructormagic.h"
21 #include "webrtc/modules/desktop_capture/desktop_capturer.h"
21 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h" 22 #include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
22 #include "webrtc/modules/desktop_capture/screen_capturer.h"
23 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h" 23 #include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
24 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h" 24 #include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
25 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h" 25 #include "webrtc/modules/desktop_capture/win/scoped_thread_desktop.h"
26 #include "webrtc/system_wrappers/include/atomic32.h" 26 #include "webrtc/system_wrappers/include/atomic32.h"
27 27
28 namespace webrtc { 28 namespace webrtc {
29 29
30 class DesktopFrame; 30 class DesktopFrame;
31 class DesktopRect; 31 class DesktopRect;
32 32
33 // Captures the screen using the Magnification API to support window exclusion. 33 // Captures the screen using the Magnification API to support window exclusion.
34 // Each capturer must run on a dedicated thread because it uses thread local 34 // Each capturer must run on a dedicated thread because it uses thread local
35 // storage for redirecting the library callback. Also the thread must have a UI 35 // storage for redirecting the library callback. Also the thread must have a UI
36 // message loop to handle the window messages for the magnifier window. 36 // message loop to handle the window messages for the magnifier window.
37 // 37 //
38 // This class does not detect DesktopFrame::updated_region(), the field is 38 // This class does not detect DesktopFrame::updated_region(), the field is
39 // always set to the entire frame rectangle. ScreenCapturerDifferWrapper should 39 // always set to the entire frame rectangle. ScreenCapturerDifferWrapper should
40 // be used if that functionality is necessary. 40 // be used if that functionality is necessary.
41 class ScreenCapturerWinMagnifier : public ScreenCapturer { 41 class ScreenCapturerWinMagnifier : public DesktopCapturer {
42 public: 42 public:
43 // |fallback_capturer| will be used to capture the screen if a non-primary 43 // |fallback_capturer| will be used to capture the screen if a non-primary
44 // screen is being captured, or the OS does not support Magnification API, or 44 // screen is being captured, or the OS does not support Magnification API, or
45 // the magnifier capturer fails (e.g. in Windows8 Metro mode). 45 // the magnifier capturer fails (e.g. in Windows8 Metro mode).
46 explicit ScreenCapturerWinMagnifier( 46 explicit ScreenCapturerWinMagnifier(
47 std::unique_ptr<DesktopCapturer> fallback_capturer); 47 std::unique_ptr<DesktopCapturer> fallback_capturer);
48 ~ScreenCapturerWinMagnifier() override; 48 ~ScreenCapturerWinMagnifier() override;
49 49
50 // Overridden from ScreenCapturer: 50 // Overridden from ScreenCapturer:
51 void Start(Callback* callback) override; 51 void Start(Callback* callback) override;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // True if the last OnMagImageScalingCallback was called and handled 142 // True if the last OnMagImageScalingCallback was called and handled
143 // successfully. Reset at the beginning of each CaptureImage call. 143 // successfully. Reset at the beginning of each CaptureImage call.
144 bool magnifier_capture_succeeded_ = true; 144 bool magnifier_capture_succeeded_ = true;
145 145
146 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier); 146 RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier);
147 }; 147 };
148 148
149 } // namespace webrtc 149 } // namespace webrtc
150 150
151 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_ 151 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_WIN_SCREEN_CAPTURER_WIN_MAGNIFIER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.h ('k') | webrtc/modules/desktop_capture/window_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698