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

Unified Diff: webrtc/modules/desktop_capture/x11/shared_x_display.h

Issue 2084893002: Implement scoped_const_refptr template. (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/x11/shared_x_display.h
diff --git a/webrtc/modules/desktop_capture/x11/shared_x_display.h b/webrtc/modules/desktop_capture/x11/shared_x_display.h
index 6cade2decc09e3cc9541d5d3dd9e74f6bee7f108..76384a1c9efd288c3120eb2bc19e5f4f3db39edc 100644
--- a/webrtc/modules/desktop_capture/x11/shared_x_display.h
+++ b/webrtc/modules/desktop_capture/x11/shared_x_display.h
@@ -49,8 +49,8 @@ class SharedXDisplay {
// DISPLAY). NULL is returned if X11 connection failed.
static rtc::scoped_refptr<SharedXDisplay> CreateDefault();
- void AddRef() { ++ref_count_; }
- void Release() {
+ void AddRef() const { ++ref_count_; }
+ void Release() const {
if (--ref_count_ == 0)
delete this;
}
@@ -72,7 +72,7 @@ class SharedXDisplay {
~SharedXDisplay();
- Atomic32 ref_count_;
+ mutable Atomic32 ref_count_;
Display* display_;
EventHandlersMap event_handlers_;
« no previous file with comments | « webrtc/common_video/video_frame_buffer.cc ('k') | webrtc/modules/rtp_rtcp/source/forward_error_correction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698