| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 void SetWebContentsTitleForAudioLogEntry(int component_id, | 87 void SetWebContentsTitleForAudioLogEntry(int component_id, |
| 88 int render_process_id, | 88 int render_process_id, |
| 89 int render_frame_id, | 89 int render_frame_id, |
| 90 media::AudioLog* audio_log); | 90 media::AudioLog* audio_log); |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 // Inner class to handle reporting pipelinestatus to UMA | 93 // Inner class to handle reporting pipelinestatus to UMA |
| 94 class MediaInternalsUMAHandler; | 94 class MediaInternalsUMAHandler; |
| 95 | 95 |
| 96 friend class AudioLogImpl; | 96 friend class AudioLogImpl; |
| 97 friend class MediaInternalsTest; | |
| 98 | 97 |
| 99 MediaInternals(); | 98 MediaInternals(); |
| 100 | 99 |
| 101 // Sends |update| to each registered UpdateCallback. Safe to call from any | 100 // Sends |update| to each registered UpdateCallback. Safe to call from any |
| 102 // thread, but will forward to the IO thread. | 101 // thread, but will forward to the IO thread. |
| 103 void SendUpdate(const base::string16& update); | 102 void SendUpdate(const base::string16& update); |
| 104 | 103 |
| 105 // Saves |event| so that it can be sent later in SendHistoricalMediaEvents(). | 104 // Saves |event| so that it can be sent later in SendHistoricalMediaEvents(). |
| 106 void SaveEvent(int process_id, const media::MediaLogEvent& event); | 105 void SaveEvent(int process_id, const media::MediaLogEvent& event); |
| 107 | 106 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 136 base::DictionaryValue audio_streams_cached_data_; | 135 base::DictionaryValue audio_streams_cached_data_; |
| 137 int owner_ids_[AUDIO_COMPONENT_MAX]; | 136 int owner_ids_[AUDIO_COMPONENT_MAX]; |
| 138 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; | 137 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; |
| 139 | 138 |
| 140 DISALLOW_COPY_AND_ASSIGN(MediaInternals); | 139 DISALLOW_COPY_AND_ASSIGN(MediaInternals); |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 } // namespace content | 142 } // namespace content |
| 144 | 143 |
| 145 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 144 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| OLD | NEW |