Commit graph

6 commits

Author SHA1 Message Date
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
andersc
9a85f0782e Enhance RTCUIApplicationStatusObserver thread safety.
Add locking around waiting for initialization to finish, since calling
dispatch_block_wait from multiple threads leads to undefined behavior.

Initialize RTCUIApplicationStatusObserver earlier to give the
initialization block more time to run on the main thread before
starting to query the application state.

http://www.dailymotion.com/video/x2mckmh

BUG=b/65558688

Review-Url: https://codereview.webrtc.org/3009383002
Cr-Commit-Position: refs/heads/master@{#19822}
2017-09-13 14:31:46 +00:00
andersc
4090f380e5 Fix retain cycles in RTCUIApplicationStatusObserver.
These retain cycles are theoretical since the singleton is supposed to
live for the lifetime of the application.

These measures were removed earlier when the object was turned into
a singleton in a previous CL, see
https://chromium-review.googlesource.com/c/external/webrtc/+/527442/3..4/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.m

The weak self handling and unused dealloc method is mostly noise and
can make a casual reader think that the object will have a limited
life cycle, i.e. the code may initially look like something it is not,
which could possibly be less readable. On the other hand, for people
looking out for potential retain cycles, the code may be distracting
since it looks like it may be leaking.

BUG=b/65558647

Review-Url: https://codereview.webrtc.org/3013023002
Cr-Commit-Position: refs/heads/master@{#19811}
2017-09-13 09:18:36 +00:00
andersc
cfab6c7c04 Increase timeout in RTCUIApplicationStatusObserver
Increase timeout since the wait function timed out in certain debugging
circumstances. Also change the check to a DCHECK since it is not really
a critical error if it would time out.

BUG=None

Review-Url: https://codereview.webrtc.org/3007773002
Cr-Commit-Position: refs/heads/master@{#19582}
2017-08-29 13:52:04 +00:00
andersc
cca0006e33 ObjC: Always dispatch async in UIApplication status observer.
Fixes a possible deadlock.

BUG=webrtc:8130

Review-Url: https://codereview.webrtc.org/3003633002
Cr-Commit-Position: refs/heads/master@{#19464}
2017-08-23 13:04:17 +00:00
Anders Carlsson
fc309750a9 Access UIApplication on main thread
Track UIApplication applicationState changes from a C++ class. Uses
NSNotificationCenter to access changes on the main thread and exposes
a local variable that can be checked from any thread.

This fixes a runtime warning on iOS 11 beta.

My Objective-C++ is a little rusty so please check if this follows
the conventions for C++ code in the project. It also changes the
interface exposed by RTCUIApplication.h, not sure if that has impact
on any public APIs that needs to be documented somewhere?

Bug: webrtc:7773
Change-Id: I9c8ba090ef9f28d812114026a906cef742192c39
Reviewed-on: https://chromium-review.googlesource.com/527442
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Kári Tristan Helgason <kthelgason@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18558}
2017-06-13 09:37:47 +00:00