| 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 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 6 #define CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Add/remove update callbacks (see above). Must be called on the IO thread. | 42 // Add/remove update callbacks (see above). Must be called on the IO thread. |
| 43 void AddUpdateCallback(const UpdateCallback& callback); | 43 void AddUpdateCallback(const UpdateCallback& callback); |
| 44 void RemoveUpdateCallback(const UpdateCallback& callback); | 44 void RemoveUpdateCallback(const UpdateCallback& callback); |
| 45 | 45 |
| 46 // Sends all cached data to each registered UpdateCallback. | 46 // Sends all cached data to each registered UpdateCallback. |
| 47 void SendEverything(); | 47 void SendEverything(); |
| 48 | 48 |
| 49 // AudioLogFactory implementation. Safe to call from any thread. | 49 // AudioLogFactory implementation. Safe to call from any thread. |
| 50 virtual scoped_ptr<media::AudioLog> CreateAudioLog( | 50 virtual scoped_ptr<media::AudioLog> CreateAudioLog( |
| 51 AudioComponent component) OVERRIDE; | 51 AudioComponent component) override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 friend class AudioLogImpl; | 54 friend class AudioLogImpl; |
| 55 friend class MediaInternalsTest; | 55 friend class MediaInternalsTest; |
| 56 friend struct base::DefaultLazyInstanceTraits<MediaInternals>; | 56 friend struct base::DefaultLazyInstanceTraits<MediaInternals>; |
| 57 | 57 |
| 58 MediaInternals(); | 58 MediaInternals(); |
| 59 | 59 |
| 60 // Sends |update| to each registered UpdateCallback. Safe to call from any | 60 // Sends |update| to each registered UpdateCallback. Safe to call from any |
| 61 // thread, but will forward to the IO thread. | 61 // thread, but will forward to the IO thread. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 78 base::Lock lock_; | 78 base::Lock lock_; |
| 79 base::DictionaryValue cached_data_; | 79 base::DictionaryValue cached_data_; |
| 80 int owner_ids_[AUDIO_COMPONENT_MAX]; | 80 int owner_ids_[AUDIO_COMPONENT_MAX]; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(MediaInternals); | 82 DISALLOW_COPY_AND_ASSIGN(MediaInternals); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace content | 85 } // namespace content |
| 86 | 86 |
| 87 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 87 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| OLD | NEW |