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

Side by Side Diff: chrome/browser/media/media_stream_capture_indicator.cc

Issue 14070016: Fix sys tray baloon shown when extensions use getMediaStream(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« 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 (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/media/media_stream_capture_indicator.h" 5 #include "chrome/browser/media/media_stream_capture_indicator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 for (content::MediaStreamDevices::const_iterator it = devices.begin(); 164 for (content::MediaStreamDevices::const_iterator it = devices.begin();
165 it != devices.end(); ++it) { 165 it != devices.end(); ++it) {
166 if (it->type == content::MEDIA_TAB_AUDIO_CAPTURE || 166 if (it->type == content::MEDIA_TAB_AUDIO_CAPTURE ||
167 it->type == content::MEDIA_TAB_VIDEO_CAPTURE) { 167 it->type == content::MEDIA_TAB_VIDEO_CAPTURE) {
168 ++mirroring_ref_count_; 168 ++mirroring_ref_count_;
169 } else if (it->type == content::MEDIA_SCREEN_VIDEO_CAPTURE) { 169 } else if (it->type == content::MEDIA_SCREEN_VIDEO_CAPTURE) {
170 ++screen_capture_ref_count_; 170 ++screen_capture_ref_count_;
171 stop_screen_capture_callback_ = close_callback; 171 stop_screen_capture_callback_ = close_callback;
172 } else if (content::IsAudioMediaType(it->type)) { 172 } else if (content::IsAudioMediaType(it->type)) {
173 ++audio_ref_count_; 173 ++audio_ref_count_;
174 incremented_audio_count = true;
174 } else if (content::IsVideoMediaType(it->type)) { 175 } else if (content::IsVideoMediaType(it->type)) {
175 ++video_ref_count_; 176 ++video_ref_count_;
177 incremented_video_count = true;
176 } else { 178 } else {
177 NOTIMPLEMENTED(); 179 NOTIMPLEMENTED();
178 } 180 }
179 } 181 }
180 182
181 if (incremented_audio_count && incremented_video_count) 183 if (incremented_audio_count && incremented_video_count)
182 return IDS_MEDIA_STREAM_STATUS_TRAY_BALLOON_BODY_AUDIO_AND_VIDEO; 184 return IDS_MEDIA_STREAM_STATUS_TRAY_BALLOON_BODY_AUDIO_AND_VIDEO;
183 else if (incremented_audio_count) 185 else if (incremented_audio_count)
184 return IDS_MEDIA_STREAM_STATUS_TRAY_BALLOON_BODY_AUDIO_ONLY; 186 return IDS_MEDIA_STREAM_STATUS_TRAY_BALLOON_BODY_AUDIO_ONLY;
185 else if (incremented_video_count) 187 else if (incremented_video_count)
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } 594 }
593 595
594 UpdateNotificationUserInterface(); 596 UpdateNotificationUserInterface();
595 } 597 }
596 598
597 void MediaStreamCaptureIndicator::OnStopScreenCapture( 599 void MediaStreamCaptureIndicator::OnStopScreenCapture(
598 const base::Closure& stop) { 600 const base::Closure& stop) {
599 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 601 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
600 stop.Run(); 602 stop.Run();
601 } 603 }
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