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

Side by Side Diff: chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc

Issue 1913293002: Limit tab sharing to Dev and Canary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h" 5 #include "chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h"
6 6
7 #include <tuple> 7 #include <tuple>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_TAB: 101 case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_TAB:
102 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 102 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
103 extensions::switches::kEnableTabForDesktopShare)) { 103 extensions::switches::kEnableTabForDesktopShare)) {
104 show_tabs = true; 104 show_tabs = true;
105 } else if (base::CommandLine::ForCurrentProcess()->HasSwitch( 105 } else if (base::CommandLine::ForCurrentProcess()->HasSwitch(
106 extensions::switches::kDisableTabForDesktopShare)) { 106 extensions::switches::kDisableTabForDesktopShare)) {
107 show_tabs = false; 107 show_tabs = false;
108 } else { 108 } else {
109 const version_info::Channel channel = chrome::GetChannel(); 109 const version_info::Channel channel = chrome::GetChannel();
110 show_tabs = (channel != version_info::Channel::STABLE); 110 if ((channel == version_info::Channel::STABLE) ||
111 (channel == version_info::Channel::BETA)) {
112 show_tabs = false;
113 } else {
114 show_tabs = true;
115 }
111 } 116 }
112 break; 117 break;
113 118
114 case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO: 119 case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO:
115 bool has_flag = base::CommandLine::ForCurrentProcess()->HasSwitch( 120 bool has_flag = base::CommandLine::ForCurrentProcess()->HasSwitch(
116 extensions::switches::kDisableDesktopCaptureAudio); 121 extensions::switches::kDisableDesktopCaptureAudio);
117 request_audio = !has_flag; 122 request_audio = !has_flag;
118 break; 123 break;
119 } 124 }
120 } 125 }
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 289
285 void DesktopCaptureRequestsRegistry::CancelRequest(int process_id, 290 void DesktopCaptureRequestsRegistry::CancelRequest(int process_id,
286 int request_id) { 291 int request_id) {
287 RequestsMap::iterator it = requests_.find(RequestId(process_id, request_id)); 292 RequestsMap::iterator it = requests_.find(RequestId(process_id, request_id));
288 if (it != requests_.end()) 293 if (it != requests_.end())
289 it->second->Cancel(); 294 it->second->Cancel();
290 } 295 }
291 296
292 297
293 } // namespace extensions 298 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698