Chromium Code Reviews| 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/media/webrtc/media_stream_capture_indicator.h" | 5 #include "chrome/browser/media/webrtc/media_stream_capture_indicator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 349 DCHECK(!image.isNull()); | 349 DCHECK(!image.isNull()); |
| 350 DCHECK(!tool_tip.empty()); | 350 DCHECK(!tool_tip.empty()); |
| 351 | 351 |
| 352 status_icon_ = status_tray->CreateStatusIcon( | 352 status_icon_ = status_tray->CreateStatusIcon( |
| 353 StatusTray::MEDIA_STREAM_CAPTURE_ICON, image, tool_tip); | 353 StatusTray::MEDIA_STREAM_CAPTURE_ICON, image, tool_tip); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void MediaStreamCaptureIndicator::EnsureStatusTrayIconResources() { | 356 void MediaStreamCaptureIndicator::EnsureStatusTrayIconResources() { |
| 357 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 357 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 358 | 358 |
| 359 // TODO(estade): these should use vector icons. | |
|
Peter Kasting
2016/10/06 07:10:29
Nit: crbug.com/505953? Or is there another one?
Evan Stade
2016/10/06 15:33:50
there is not another one filed. Dunno if you wante
| |
| 359 if (!mic_image_) { | 360 if (!mic_image_) { |
| 360 mic_image_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 361 mic_image_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 361 IDR_INFOBAR_MEDIA_STREAM_MIC); | 362 IDR_INFOBAR_MEDIA_STREAM_MIC); |
| 362 } | 363 } |
| 363 if (!camera_image_) { | 364 if (!camera_image_) { |
| 364 camera_image_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 365 camera_image_ = ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 365 IDR_INFOBAR_MEDIA_STREAM_CAMERA); | 366 IDR_INFOBAR_MEDIA_STREAM_CAMERA); |
| 366 } | 367 } |
| 367 DCHECK(mic_image_); | 368 DCHECK(mic_image_); |
| 368 DCHECK(camera_image_); | 369 DCHECK(camera_image_); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 455 } else if (audio && !video) { | 456 } else if (audio && !video) { |
| 456 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; | 457 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_AUDIO_ONLY; |
| 457 *image = *mic_image_; | 458 *image = *mic_image_; |
| 458 } else if (!audio && video) { | 459 } else if (!audio && video) { |
| 459 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; | 460 message_id = IDS_MEDIA_STREAM_STATUS_TRAY_TEXT_VIDEO_ONLY; |
| 460 *image = *camera_image_; | 461 *image = *camera_image_; |
| 461 } | 462 } |
| 462 | 463 |
| 463 *tool_tip = l10n_util::GetStringUTF16(message_id); | 464 *tool_tip = l10n_util::GetStringUTF16(message_id); |
| 464 } | 465 } |
| OLD | NEW |