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

Unified Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h

Issue 1988783003: Use std::unique_ptr<> to pass frame ownership in DesktopCapturer impls. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
index 623c8a3003432602c080a9c196718e1464852701..1a90791c0365cbb78bca78c670448a9615c0c0f9 100644
--- a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
+++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.h
@@ -106,12 +106,12 @@ class ScreenCapturerWinMagnifier : public ScreenCapturer {
static Atomic32 tls_index_;
std::unique_ptr<ScreenCapturer> fallback_capturer_;
- bool fallback_capturer_started_;
- Callback* callback_;
+ bool fallback_capturer_started_ = false;
+ Callback* callback_ = nullptr;
std::unique_ptr<SharedMemoryFactory> shared_memory_factory_;
- ScreenId current_screen_id_;
+ ScreenId current_screen_id_ = kFullDesktopScreenId;
std::wstring current_device_key_;
- HWND excluded_window_;
+ HWND excluded_window_ = NULL;
// A thread-safe list of invalid rectangles, and the size of the most
// recently captured screen.
@@ -124,31 +124,31 @@ class ScreenCapturerWinMagnifier : public ScreenCapturer {
std::unique_ptr<Differ> differ_;
// Used to suppress duplicate logging of SetThreadExecutionState errors.
- bool set_thread_execution_state_failed_;
+ bool set_thread_execution_state_failed_ = false;
ScopedThreadDesktop desktop_;
// Used for getting the screen dpi.
- HDC desktop_dc_;
+ HDC desktop_dc_ = NULL;
- HMODULE mag_lib_handle_;
- MagInitializeFunc mag_initialize_func_;
- MagUninitializeFunc mag_uninitialize_func_;
- MagSetWindowSourceFunc set_window_source_func_;
- MagSetWindowFilterListFunc set_window_filter_list_func_;
- MagSetImageScalingCallbackFunc set_image_scaling_callback_func_;
+ HMODULE mag_lib_handle_ = NULL;
+ MagInitializeFunc mag_initialize_func_ = nullptr;
+ MagUninitializeFunc mag_uninitialize_func_ = nullptr;
+ MagSetWindowSourceFunc set_window_source_func_ = nullptr;
+ MagSetWindowFilterListFunc set_window_filter_list_func_ = nullptr;
+ MagSetImageScalingCallbackFunc set_image_scaling_callback_func_ = nullptr;
// The hidden window hosting the magnifier control.
- HWND host_window_;
+ HWND host_window_ = NULL;
// The magnifier control that captures the screen.
- HWND magnifier_window_;
+ HWND magnifier_window_ = NULL;
// True if the magnifier control has been successfully initialized.
- bool magnifier_initialized_;
+ bool magnifier_initialized_ = false;
// True if the last OnMagImageScalingCallback was called and handled
// successfully. Reset at the beginning of each CaptureImage call.
- bool magnifier_capture_succeeded_;
+ bool magnifier_capture_succeeded_ = true;
RTC_DISALLOW_COPY_AND_ASSIGN(ScreenCapturerWinMagnifier);
};

Powered by Google App Engine
This is Rietveld 408576698