| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/tabs/tab_utils.h" | 5 #include "chrome/browser/ui/tabs/tab_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 scoped_refptr<MediaStreamCaptureIndicator> indicator = | 152 scoped_refptr<MediaStreamCaptureIndicator> indicator = |
| 153 MediaCaptureDevicesDispatcher::GetInstance()-> | 153 MediaCaptureDevicesDispatcher::GetInstance()-> |
| 154 GetMediaStreamCaptureIndicator(); | 154 GetMediaStreamCaptureIndicator(); |
| 155 if (indicator.get()) { | 155 if (indicator.get()) { |
| 156 if (indicator->IsBeingMirrored(contents)) | 156 if (indicator->IsBeingMirrored(contents)) |
| 157 return TabAlertState::TAB_CAPTURING; | 157 return TabAlertState::TAB_CAPTURING; |
| 158 if (indicator->IsCapturingUserMedia(contents)) | 158 if (indicator->IsCapturingUserMedia(contents)) |
| 159 return TabAlertState::MEDIA_RECORDING; | 159 return TabAlertState::MEDIA_RECORDING; |
| 160 } | 160 } |
| 161 | 161 |
| 162 if (contents->IsBluetoothDeviceConnected()) | 162 if (contents->IsConnectedToBluetoothDevice()) |
| 163 return TabAlertState::BLUETOOTH_CONNECTED; | 163 return TabAlertState::BLUETOOTH_CONNECTED; |
| 164 | 164 |
| 165 if (contents->IsAudioMuted()) | 165 if (contents->IsAudioMuted()) |
| 166 return TabAlertState::AUDIO_MUTING; | 166 return TabAlertState::AUDIO_MUTING; |
| 167 if (contents->WasRecentlyAudible()) | 167 if (contents->WasRecentlyAudible()) |
| 168 return TabAlertState::AUDIO_PLAYING; | 168 return TabAlertState::AUDIO_PLAYING; |
| 169 | 169 |
| 170 return TabAlertState::NONE; | 170 return TabAlertState::NONE; |
| 171 } | 171 } |
| 172 | 172 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 const std::vector<int>& indices) { | 375 const std::vector<int>& indices) { |
| 376 for (std::vector<int>::const_iterator i = indices.begin(); i != indices.end(); | 376 for (std::vector<int>::const_iterator i = indices.begin(); i != indices.end(); |
| 377 ++i) { | 377 ++i) { |
| 378 if (!tab_strip.GetWebContentsAt(*i)->IsAudioMuted()) | 378 if (!tab_strip.GetWebContentsAt(*i)->IsAudioMuted()) |
| 379 return false; | 379 return false; |
| 380 } | 380 } |
| 381 return true; | 381 return true; |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace chrome | 384 } // namespace chrome |
| OLD | NEW |