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

Unified Diff: content/public/browser/desktop_capture.cc

Issue 2961193002: Use same DesktopCaptureOptions in DesktopCaptureBase and DesktopCaptureDevice (Closed)
Patch Set: Sync latest changes Created 3 years, 5 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 | « content/public/browser/desktop_capture.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/desktop_capture.cc
diff --git a/content/public/browser/desktop_capture.cc b/content/public/browser/desktop_capture.cc
new file mode 100644
index 0000000000000000000000000000000000000000..139ea14aca7939fa10a5d5cad6df45d932b8122c
--- /dev/null
+++ b/content/public/browser/desktop_capture.cc
@@ -0,0 +1,30 @@
+// Copyright 2017 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.
+
+#include "content/public/browser/desktop_capture.h"
+
+#include "base/feature_list.h"
+#include "build/build_config.h"
+
+namespace content {
+
+webrtc::DesktopCaptureOptions CreateDesktopCaptureOptions() {
+ auto options = webrtc::DesktopCaptureOptions::CreateDefault();
+ // Leave desktop effects enabled during WebRTC captures.
+ options.set_disable_effects(false);
+#if defined(OS_WIN)
+ static constexpr base::Feature kDirectXCapturer{
+ "DirectXCapturer",
+ base::FEATURE_ENABLED_BY_DEFAULT};
+ if (base::FeatureList::IsEnabled(kDirectXCapturer)) {
+ options.set_allow_directx_capturer(true);
+ options.set_allow_use_magnification_api(false);
+ } else {
+ options.set_allow_use_magnification_api(true);
+ }
+#endif // defined(OS_WIN)
+ return options;
+}
+
+} // namespace content
« no previous file with comments | « content/public/browser/desktop_capture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698