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

Unified Diff: content/browser/media/capture/desktop_capture_device.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
Index: content/browser/media/capture/desktop_capture_device.cc
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
index a38923b2e15540383092c779e5ea7668c96988f2..5c82401e1459979419bbad93ea6cbb3ea814c59b 100644
--- a/content/browser/media/capture/desktop_capture_device.cc
+++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -10,7 +10,6 @@
#include <utility>
#include "base/bind.h"
-#include "base/feature_list.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
@@ -25,6 +24,7 @@
#include "build/build_config.h"
#include "content/browser/media/capture/desktop_capture_device_uma_types.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/desktop_capture.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/service_manager_connection.h"
@@ -79,11 +79,6 @@ std::unique_ptr<service_manager::Connector> GetServiceConnector() {
} // namespace
-#if defined(OS_WIN)
-const base::Feature kDirectXCapturer{"DirectXCapturer",
- base::FEATURE_ENABLED_BY_DEFAULT};
-#endif
-
class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback {
public:
Core(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
@@ -401,20 +396,7 @@ void DesktopCaptureDevice::Core::RequestWakeLock(
// static
std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
const DesktopMediaID& source) {
- webrtc::DesktopCaptureOptions options =
- webrtc::DesktopCaptureOptions::CreateDefault();
- // Leave desktop effects enabled during WebRTC captures.
- options.set_disable_effects(false);
-
-#if defined(OS_WIN)
- if (!base::FeatureList::IsEnabled(kDirectXCapturer)) {
- options.set_allow_use_magnification_api(true);
- } else {
- options.set_allow_directx_capturer(true);
- options.set_allow_use_magnification_api(false);
- }
-#endif
-
+ auto options = CreateDesktopCaptureOptions();
std::unique_ptr<webrtc::DesktopCapturer> capturer;
switch (source.type) {
« no previous file with comments | « chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698