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

Side by Side Diff: chrome/browser/ui/tabs/tab_utils.cc

Issue 1848663002: bluetooth: Remove indicator only when there are no more devices connected (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix format" 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 | content/browser/bluetooth/bluetooth_dispatcher_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698