Index: remoting/host/host_attributes_win.h |
diff --git a/remoting/host/host_attributes_win.h b/remoting/host/host_attributes_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ca7b4a168dfdb5e7d59412cc05633be19e7fd944 |
--- /dev/null |
+++ b/remoting/host/host_attributes_win.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef REMOTING_HOST_HOST_ATTRIBUTES_WIN_H_ |
+#define REMOTING_HOST_HOST_ATTRIBUTES_WIN_H_ |
+ |
+#include "remoting/host/host_attributes.h" |
+#include "third_party/webrtc/modules/desktop_capture/win/screen_capturer_win_directx.h" |
+ |
+namespace remoting { |
+ |
+namespace { |
+ |
+inline constexpr bool IsDebug() { |
Sergey Ulanov
2016/11/07 20:11:33
I don't think that putting this in the per-platfor
Hzj_jie
2016/11/08 01:29:54
Done.
|
+#if defined(NDEBUG) |
+ return false; |
+#else |
+ return true; |
+#endif |
+} |
+ |
+} // namespace |
+ |
+// TODO(zijiehe): Add DirectX version attributes. Blocked by change |
+// https://codereview.chromium.org/2468083002/. |
+static StaticAttribute kStaticAttributes[] = { |
Hzj_jie
2016/11/05 05:29:28
MSVC does not allow to change the value of a const
|
+ StaticAttribute::Create( { "Debug-Build", &IsDebug } ), |
Hzj_jie
2016/11/05 05:29:28
MSVC does not allow sizeof(int[0]), i.e. size of a
Sergey Ulanov
2016/11/07 20:11:33
StaticAttribute::Create() is not constexpr, so thi
Hzj_jie
2016/11/08 01:29:54
I think requiring static initializer or not depend
Sergey Ulanov
2016/11/08 20:11:05
I think if an attributes cannot be evaluated in co
Hzj_jie
2016/11/09 02:37:52
Yes, that's a good opinion, for expensive but cach
|
+}; |
+static constexpr DynamicAttribute kDynamicAttributes[] = { |
+ { "DirectX-Capturer", &webrtc::ScreenCapturerWinDirectx::IsSupported }, |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_HOST_HOST_ATTRIBUTES_WIN_H_ |