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

Unified Diff: chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc

Issue 1838623002: Bring Audio Share and Tab Share Default On (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Three value flag for Tab Created 4 years, 9 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: chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
index d30e2408c888c09f4323378f2bdaf992e5fa0ac5..617e6f0de07063bdcac588aaedb2f00389c38165 100644
--- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
+++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
@@ -18,6 +18,8 @@
#include "chrome/browser/media/native_desktop_media_list.h"
#include "chrome/browser/media/tab_desktop_media_list.h"
#include "chrome/browser/ui/ash/ash_util.h"
+#include "chrome/common/channel_info.h"
+#include "components/version_info/version_info.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
@@ -100,13 +102,19 @@ bool DesktopCaptureChooseDesktopMediaFunctionBase::Execute(
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
extensions::switches::kEnableTabForDesktopShare)) {
show_tabs = true;
+ } else if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ extensions::switches::kDisableTabForDesktopShare)) {
+ show_tabs = false;
+ } else {
+ const version_info::Channel channel = chrome::GetChannel();
+ show_tabs = (channel != version_info::Channel::STABLE);
}
break;
case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO:
bool has_flag = base::CommandLine::ForCurrentProcess()->HasSwitch(
- extensions::switches::kEnableDesktopCaptureAudio);
- request_audio = has_flag;
+ extensions::switches::kDisableDesktopCaptureAudio);
+ request_audio = !has_flag;
break;
}
}

Powered by Google App Engine
This is Rietveld 408576698