| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 9 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 10 #include "chrome/browser/media/media_stream_capture_indicator.h" | 10 #include "chrome/browser/media/media_stream_capture_indicator.h" |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 return TAB_MEDIA_STATE_NONE; | 162 return TAB_MEDIA_STATE_NONE; |
| 163 } | 163 } |
| 164 | 164 |
| 165 gfx::Image GetTabMediaIndicatorImage(TabMediaState media_state, | 165 gfx::Image GetTabMediaIndicatorImage(TabMediaState media_state, |
| 166 SkColor button_color) { | 166 SkColor button_color) { |
| 167 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); | 167 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
| 168 switch (media_state) { | 168 switch (media_state) { |
| 169 #if !defined(OS_MACOSX) | 169 #if !defined(OS_MACOSX) |
| 170 case TAB_MEDIA_STATE_AUDIO_PLAYING: | 170 case TAB_MEDIA_STATE_AUDIO_PLAYING: |
| 171 case TAB_MEDIA_STATE_AUDIO_MUTING: { | 171 case TAB_MEDIA_STATE_AUDIO_MUTING: { |
| 172 return gfx::Image( | 172 return gfx::Image(gfx::CreatePrimaryVectorIcon( |
| 173 gfx::CreateVectorIcon(media_state == TAB_MEDIA_STATE_AUDIO_PLAYING | 173 media_state == TAB_MEDIA_STATE_AUDIO_PLAYING |
| 174 ? gfx::VectorIconId::TAB_AUDIO | 174 ? gfx::VectorIconId::TAB_AUDIO |
| 175 : gfx::VectorIconId::TAB_AUDIO_MUTING, | 175 : gfx::VectorIconId::TAB_AUDIO_MUTING, |
| 176 16, button_color)); | 176 button_color)); |
| 177 } | 177 } |
| 178 #else | 178 #else |
| 179 case TAB_MEDIA_STATE_AUDIO_PLAYING: | 179 case TAB_MEDIA_STATE_AUDIO_PLAYING: |
| 180 return rb->GetNativeImageNamed(IDR_TAB_AUDIO_INDICATOR); | 180 return rb->GetNativeImageNamed(IDR_TAB_AUDIO_INDICATOR); |
| 181 case TAB_MEDIA_STATE_AUDIO_MUTING: | 181 case TAB_MEDIA_STATE_AUDIO_MUTING: |
| 182 return rb->GetNativeImageNamed(IDR_TAB_AUDIO_MUTING_INDICATOR); | 182 return rb->GetNativeImageNamed(IDR_TAB_AUDIO_MUTING_INDICATOR); |
| 183 #endif | 183 #endif |
| 184 case TAB_MEDIA_STATE_RECORDING: | 184 case TAB_MEDIA_STATE_RECORDING: |
| 185 return rb->GetNativeImageNamed(IDR_TAB_RECORDING_INDICATOR); | 185 return rb->GetNativeImageNamed(IDR_TAB_RECORDING_INDICATOR); |
| 186 case TAB_MEDIA_STATE_CAPTURING: | 186 case TAB_MEDIA_STATE_CAPTURING: |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 const std::vector<int>& indices) { | 345 const std::vector<int>& indices) { |
| 346 for (std::vector<int>::const_iterator i = indices.begin(); i != indices.end(); | 346 for (std::vector<int>::const_iterator i = indices.begin(); i != indices.end(); |
| 347 ++i) { | 347 ++i) { |
| 348 if (!tab_strip.GetWebContentsAt(*i)->IsAudioMuted()) | 348 if (!tab_strip.GetWebContentsAt(*i)->IsAudioMuted()) |
| 349 return false; | 349 return false; |
| 350 } | 350 } |
| 351 return true; | 351 return true; |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace chrome | 354 } // namespace chrome |
| OLD | NEW |