| 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> |
| 11 #include <tuple> | 11 #include <tuple> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/lazy_instance.h" | |
| 17 #include "base/macros.h" | 16 #include "base/macros.h" |
| 18 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 19 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
| 20 #include "base/values.h" | 19 #include "base/values.h" |
| 21 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
| 22 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 23 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 24 #include "media/audio/audio_logging.h" | 23 #include "media/audio/audio_logging.h" |
| 25 #include "media/base/media_log.h" | 24 #include "media/base/media_log.h" |
| 26 #include "media/capture/video/video_capture_device_descriptor.h" | 25 #include "media/capture/video/video_capture_device_descriptor.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 int render_process_id, | 88 int render_process_id, |
| 90 int render_frame_id, | 89 int render_frame_id, |
| 91 media::AudioLog* audio_log); | 90 media::AudioLog* audio_log); |
| 92 | 91 |
| 93 private: | 92 private: |
| 94 // Inner class to handle reporting pipelinestatus to UMA | 93 // Inner class to handle reporting pipelinestatus to UMA |
| 95 class MediaInternalsUMAHandler; | 94 class MediaInternalsUMAHandler; |
| 96 | 95 |
| 97 friend class AudioLogImpl; | 96 friend class AudioLogImpl; |
| 98 friend class MediaInternalsTest; | 97 friend class MediaInternalsTest; |
| 99 friend struct base::DefaultLazyInstanceTraits<MediaInternals>; | |
| 100 | 98 |
| 101 MediaInternals(); | 99 MediaInternals(); |
| 102 | 100 |
| 103 // Sends |update| to each registered UpdateCallback. Safe to call from any | 101 // Sends |update| to each registered UpdateCallback. Safe to call from any |
| 104 // thread, but will forward to the IO thread. | 102 // thread, but will forward to the IO thread. |
| 105 void SendUpdate(const base::string16& update); | 103 void SendUpdate(const base::string16& update); |
| 106 | 104 |
| 107 // Saves |event| so that it can be sent later in SendHistoricalMediaEvents(). | 105 // Saves |event| so that it can be sent later in SendHistoricalMediaEvents(). |
| 108 void SaveEvent(int process_id, const media::MediaLogEvent& event); | 106 void SaveEvent(int process_id, const media::MediaLogEvent& event); |
| 109 | 107 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 138 base::DictionaryValue audio_streams_cached_data_; | 136 base::DictionaryValue audio_streams_cached_data_; |
| 139 int owner_ids_[AUDIO_COMPONENT_MAX]; | 137 int owner_ids_[AUDIO_COMPONENT_MAX]; |
| 140 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; | 138 std::unique_ptr<MediaInternalsUMAHandler> uma_handler_; |
| 141 | 139 |
| 142 DISALLOW_COPY_AND_ASSIGN(MediaInternals); | 140 DISALLOW_COPY_AND_ASSIGN(MediaInternals); |
| 143 }; | 141 }; |
| 144 | 142 |
| 145 } // namespace content | 143 } // namespace content |
| 146 | 144 |
| 147 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 145 #endif // CONTENT_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
| OLD | NEW |