OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 return !document.settings() || document.settings()->preferHiddenVolumeContro
ls(); | 74 return !document.settings() || document.settings()->preferHiddenVolumeContro
ls(); |
75 } | 75 } |
76 | 76 |
77 class MediaControls::BatchedControlUpdate { | 77 class MediaControls::BatchedControlUpdate { |
78 WTF_MAKE_NONCOPYABLE(BatchedControlUpdate); | 78 WTF_MAKE_NONCOPYABLE(BatchedControlUpdate); |
79 STACK_ALLOCATED(); | 79 STACK_ALLOCATED(); |
80 public: | 80 public: |
81 explicit BatchedControlUpdate(MediaControls* controls) | 81 explicit BatchedControlUpdate(MediaControls* controls) |
82 : m_controls(controls) | 82 : m_controls(controls) |
83 { | 83 { |
84 ASSERT(isMainThread()); | 84 DCHECK(isMainThread()); |
85 ASSERT(s_batchDepth >= 0); | 85 DCHECK_GE(s_batchDepth, 0); |
86 ++s_batchDepth; | 86 ++s_batchDepth; |
87 } | 87 } |
88 ~BatchedControlUpdate() | 88 ~BatchedControlUpdate() |
89 { | 89 { |
90 ASSERT(isMainThread()); | 90 DCHECK(isMainThread()); |
91 ASSERT(s_batchDepth > 0); | 91 DCHECK_GT(s_batchDepth, 0); |
92 if (!(--s_batchDepth)) | 92 if (!(--s_batchDepth)) |
93 m_controls->computeWhichControlsFit(); | 93 m_controls->computeWhichControlsFit(); |
94 } | 94 } |
95 | 95 |
96 private: | 96 private: |
97 Member<MediaControls> m_controls; | 97 Member<MediaControls> m_controls; |
98 static int s_batchDepth; | 98 static int s_batchDepth; |
99 }; | 99 }; |
100 | 100 |
101 // Count of number open batches for controls visibility. | 101 // Count of number open batches for controls visibility. |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 visitor->trace(m_fullScreenButton); | 797 visitor->trace(m_fullScreenButton); |
798 visitor->trace(m_durationDisplay); | 798 visitor->trace(m_durationDisplay); |
799 visitor->trace(m_enclosure); | 799 visitor->trace(m_enclosure); |
800 visitor->trace(m_textTrackList); | 800 visitor->trace(m_textTrackList); |
801 visitor->trace(m_castButton); | 801 visitor->trace(m_castButton); |
802 visitor->trace(m_overlayCastButton); | 802 visitor->trace(m_overlayCastButton); |
803 HTMLDivElement::trace(visitor); | 803 HTMLDivElement::trace(visitor); |
804 } | 804 } |
805 | 805 |
806 } // namespace blink | 806 } // namespace blink |
OLD | NEW |