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

Unified Diff: webrtc/sdk/objc/Framework/Classes/helpers.mm

Issue 2586433002: Compile ios helpers on mac as well. (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/helpers.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/helpers.mm b/webrtc/sdk/objc/Framework/Classes/helpers.mm
index ef0e2803f3965fbebbf3264c0649a35be3aabbcb..c0e5f1ed79ec113846e5016f7ecfcc94115b8483 100644
--- a/webrtc/sdk/objc/Framework/Classes/helpers.mm
+++ b/webrtc/sdk/objc/Framework/Classes/helpers.mm
@@ -8,12 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#if defined(WEBRTC_IOS)
#import <AVFoundation/AVFoundation.h>
#import <Foundation/Foundation.h>
#import <sys/sysctl.h>
+#if defined(WEBRTC_IOS)
#import <UIKit/UIKit.h>
+#endif
#include <memory>
@@ -24,9 +25,11 @@
namespace webrtc {
namespace ios {
+#if defined(WEBRTC_IOS)
bool isOperatingSystemAtLeastVersion(double version) {
return GetSystemVersion() >= version;
}
+#endif
NSString* NSStringFromStdString(const std::string& stdString) {
// std::string may contain null termination character so we construct
@@ -61,6 +64,7 @@ std::string GetCurrentThreadDescription() {
return StdStringFromNSString(name);
}
+#if defined(WEBRTC_IOS)
std::string GetAudioSessionCategory() {
NSString* category = [[AVAudioSession sharedInstance] category];
return StdStringFromNSString(category);
@@ -89,6 +93,7 @@ std::string GetDeviceType() {
NSString* deviceModel = [[UIDevice currentDevice] model];
return StdStringFromNSString(deviceModel);
}
+#endif
std::string GetDeviceName() {
size_t size;
@@ -134,4 +139,3 @@ bool GetLowPowerModeEnabled() {
} // namespace ios
} // namespace webrtc
-#endif // defined(WEBRTC_IOS)
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698