Chromium Code Reviews| 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; | |
|
Sergey Ulanov
2016/04/22 21:55:26
show_tabs is false by default, so this assignment
| |
| 111 } | 113 } |
| 112 break; | 114 break; |
| 113 | 115 |
| 114 case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO: | 116 case api::desktop_capture::DESKTOP_CAPTURE_SOURCE_TYPE_AUDIO: |
| 115 bool has_flag = base::CommandLine::ForCurrentProcess()->HasSwitch( | 117 bool has_flag = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 116 extensions::switches::kDisableDesktopCaptureAudio); | 118 extensions::switches::kDisableDesktopCaptureAudio); |
| 117 request_audio = !has_flag; | 119 request_audio = !has_flag; |
| 118 break; | 120 break; |
| 119 } | 121 } |
| 120 } | 122 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 284 | 286 |
| 285 void DesktopCaptureRequestsRegistry::CancelRequest(int process_id, | 287 void DesktopCaptureRequestsRegistry::CancelRequest(int process_id, |
| 286 int request_id) { | 288 int request_id) { |
| 287 RequestsMap::iterator it = requests_.find(RequestId(process_id, request_id)); | 289 RequestsMap::iterator it = requests_.find(RequestId(process_id, request_id)); |
| 288 if (it != requests_.end()) | 290 if (it != requests_.end()) |
| 289 it->second->Cancel(); | 291 it->second->Cancel(); |
| 290 } | 292 } |
| 291 | 293 |
| 292 | 294 |
| 293 } // namespace extensions | 295 } // namespace extensions |
| OLD | NEW |