| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 AudioComponent component) override; | 82 AudioComponent component) override; |
| 83 | 83 |
| 84 // If possible, i.e. a WebContents exists for the given RenderFrameHostID, | 84 // If possible, i.e. a WebContents exists for the given RenderFrameHostID, |
| 85 // tells an existing AudioLogEntry the WebContents title for easier | 85 // tells an existing AudioLogEntry the WebContents title for easier |
| 86 // differentiation on the UI. | 86 // differentiation on the UI. |
| 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 void OnProcessTerminatedForTesting(int process_id); |
| 93 |
| 92 private: | 94 private: |
| 93 // Inner class to handle reporting pipelinestatus to UMA | 95 // Inner class to handle reporting pipelinestatus to UMA |
| 94 class MediaInternalsUMAHandler; | 96 class MediaInternalsUMAHandler; |
| 95 | 97 |
| 96 friend class AudioLogImpl; | 98 friend class AudioLogImpl; |
| 97 friend class MediaInternalsTest; | |
| 98 | 99 |
| 99 MediaInternals(); | 100 MediaInternals(); |
| 100 | 101 |
| 101 // Sends |update| to each registered UpdateCallback. Safe to call from any | 102 // Sends |update| to each registered UpdateCallback. Safe to call from any |
| 102 // thread, but will forward to the IO thread. | 103 // thread, but will forward to the IO thread. |
| 103 void SendUpdate(const base::string16& update); | 104 void SendUpdate(const base::string16& update); |
| 104 | 105 |
| 105 // Saves |event| so that it can be sent later in SendHistoricalMediaEvents(). | 106 // Saves |event| so that it can be sent later in SendHistoricalMediaEvents(). |
| 106 void SaveEvent(int process_id, const media::MediaLogEvent& event); | 107 void SaveEvent(int process_id, const media::MediaLogEvent& event); |
| 107 | 108 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 136 base::DictionaryValue audio_streams_cached_data_; | 137 base::DictionaryValue audio_streams_cached_data_; |
| 137 int owner_ids_[AUDIO_COMPONENT_MAX]; | 138 int owner_ids_[AUDIO_COMPONENT_MAX]; |
| 138 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; | 139 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; |
| 139 | 140 |
| 140 DISALLOW_COPY_AND_ASSIGN(MediaInternals); | 141 DISALLOW_COPY_AND_ASSIGN(MediaInternals); |
| 141 }; | 142 }; |
| 142 | 143 |
| 143 } // namespace content | 144 } // namespace content |
| 144 | 145 |
| 145 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 146 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| OLD | NEW |