| Index: webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
|
| diff --git a/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h b/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
|
| index bddc8099b25388402fb8a8f7e9abe7bb7ffccbf0..9f78eb1930df43c036f71d3edc58af26842f5ef6 100644
|
| --- a/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
|
| +++ b/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
|
| @@ -13,8 +13,8 @@
|
|
|
| #include <ApplicationServices/ApplicationServices.h>
|
|
|
| +#include "webrtc/base/atomicops.h"
|
| #include "webrtc/modules/desktop_capture/window_capturer.h"
|
| -#include "webrtc/system_wrappers/interface/atomic32.h"
|
| #include "webrtc/system_wrappers/interface/tick_util.h"
|
|
|
| namespace webrtc {
|
| @@ -34,9 +34,9 @@ class FullScreenChromeWindowDetector {
|
| public:
|
| FullScreenChromeWindowDetector();
|
|
|
| - void AddRef() { ++ref_count_; }
|
| + void AddRef() { rtc::AtomicOps::Increment(&ref_count_); }
|
| void Release() {
|
| - if (--ref_count_ == 0)
|
| + if (rtc::AtomicOps::Decrement(&ref_count_) == 0)
|
| delete this;
|
| }
|
|
|
| @@ -51,7 +51,7 @@ class FullScreenChromeWindowDetector {
|
| private:
|
| ~FullScreenChromeWindowDetector();
|
|
|
| - Atomic32 ref_count_;
|
| + volatile int ref_count_;
|
|
|
| // We cache the last two results of the window list, so
|
| // |previous_window_list_| is taken at least 500ms before the next Capture()
|
|
|