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 13 matching lines...) Expand all Loading... |
24 private: | 24 private: |
25 explicit LastMuteMetadata(content::WebContents* contents) {} | 25 explicit LastMuteMetadata(content::WebContents* contents) {} |
26 friend class content::WebContentsUserData<LastMuteMetadata>; | 26 friend class content::WebContentsUserData<LastMuteMetadata>; |
27 }; | 27 }; |
28 | 28 |
29 DEFINE_WEB_CONTENTS_USER_DATA_KEY(LastMuteMetadata); | 29 DEFINE_WEB_CONTENTS_USER_DATA_KEY(LastMuteMetadata); |
30 | 30 |
31 namespace chrome { | 31 namespace chrome { |
32 | 32 |
33 const char kMutedToggleCauseUser[] = "user"; | 33 const char kMutedToggleCauseUser[] = "user"; |
34 const char kMutedToggleCauseCapture[] = "auto-forced for capture"; | 34 const char kMutedToggleCauseCapture[] = "capture"; |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 // Interval between frame updates of the tab indicator animations. This is not | 38 // Interval between frame updates of the tab indicator animations. This is not |
39 // the usual 60 FPS because a trade-off must be made between tab UI animation | 39 // the usual 60 FPS because a trade-off must be made between tab UI animation |
40 // smoothness and media recording/playback performance on low-end hardware. | 40 // smoothness and media recording/playback performance on low-end hardware. |
41 const int kIndicatorFrameIntervalMs = 50; // 20 FPS | 41 const int kIndicatorFrameIntervalMs = 50; // 20 FPS |
42 | 42 |
43 // Fade-in/out duration for the tab indicator animations. Fade-in is quick to | 43 // Fade-in/out duration for the tab indicator animations. Fade-in is quick to |
44 // immediately notify the user. Fade-out is more gradual, so that the user has | 44 // immediately notify the user. Fade-out is more gradual, so that the user has |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 const std::vector<int>& indices) { | 296 const std::vector<int>& indices) { |
297 for (std::vector<int>::const_iterator i = indices.begin(); i != indices.end(); | 297 for (std::vector<int>::const_iterator i = indices.begin(); i != indices.end(); |
298 ++i) { | 298 ++i) { |
299 if (!IsTabAudioMuted(tab_strip.GetWebContentsAt(*i))) | 299 if (!IsTabAudioMuted(tab_strip.GetWebContentsAt(*i))) |
300 return false; | 300 return false; |
301 } | 301 } |
302 return true; | 302 return true; |
303 } | 303 } |
304 | 304 |
305 } // namespace chrome | 305 } // namespace chrome |
OLD | NEW |