OLD | NEW |
---|---|
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 Loading... | |
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{ | |
Sergey Ulanov
2016/04/22 22:10:15
nit: add spaces around else please (or 'git cl for
| |
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 Loading... | |
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 |
OLD | NEW |