| OLD | NEW |
| 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 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" | 11 #include "webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h" |
| 12 | 12 |
| 13 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" | 13 #include "webrtc/modules/desktop_capture/mac/desktop_configuration.h" |
| 14 #include "webrtc/system_wrappers/interface/event_wrapper.h" | 14 #include "webrtc/system_wrappers/include/event_wrapper.h" |
| 15 #include "webrtc/system_wrappers/interface/logging.h" | 15 #include "webrtc/system_wrappers/include/logging.h" |
| 16 | 16 |
| 17 namespace webrtc { | 17 namespace webrtc { |
| 18 | 18 |
| 19 // The amount of time allowed for displays to reconfigure. | 19 // The amount of time allowed for displays to reconfigure. |
| 20 static const int64_t kDisplayConfigurationEventTimeoutMs = 10 * 1000; | 20 static const int64_t kDisplayConfigurationEventTimeoutMs = 10 * 1000; |
| 21 | 21 |
| 22 DesktopConfigurationMonitor::DesktopConfigurationMonitor() | 22 DesktopConfigurationMonitor::DesktopConfigurationMonitor() |
| 23 : ref_count_(0), | 23 : ref_count_(0), |
| 24 display_configuration_capture_event_(EventWrapper::Create()) { | 24 display_configuration_capture_event_(EventWrapper::Create()) { |
| 25 CGError err = CGDisplayRegisterReconfigurationCallback( | 25 CGError err = CGDisplayRegisterReconfigurationCallback( |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 reconfiguring_displays_.erase(display); | 82 reconfiguring_displays_.erase(display); |
| 83 if (reconfiguring_displays_.empty()) { | 83 if (reconfiguring_displays_.empty()) { |
| 84 desktop_configuration_ = MacDesktopConfiguration::GetCurrent( | 84 desktop_configuration_ = MacDesktopConfiguration::GetCurrent( |
| 85 MacDesktopConfiguration::TopLeftOrigin); | 85 MacDesktopConfiguration::TopLeftOrigin); |
| 86 display_configuration_capture_event_->Set(); | 86 display_configuration_capture_event_->Set(); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace webrtc | 91 } // namespace webrtc |
| OLD | NEW |