| 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 MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 5 #ifndef MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
| 6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 MediaLogEvent& operator=(const MediaLogEvent& event) { | 23 MediaLogEvent& operator=(const MediaLogEvent& event) { |
| 24 id = event.id; | 24 id = event.id; |
| 25 type = event.type; | 25 type = event.type; |
| 26 std::unique_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy()); | 26 std::unique_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy()); |
| 27 params.Swap(event_copy.get()); | 27 params.Swap(event_copy.get()); |
| 28 time = event.time; | 28 time = event.time; |
| 29 return *this; | 29 return *this; |
| 30 } | 30 } |
| 31 | 31 |
| 32 enum Type { | 32 enum Type { |
| 33 // A MediaLog is being created. |
| 34 // params: none. |
| 35 // |
| 36 // This event allows the browser service to discard state but still |
| 37 // determine which events belong to new players. It must be logged exactly |
| 38 // once, as the first event in a MediaLog. |
| 39 // |
| 40 // Note: RenderMediaLog sends this event automatically; future |
| 41 // implementations of MediaLog should do so as well. |
| 42 MEDIALOG_CREATED, |
| 43 |
| 33 // A WebMediaPlayer is being created or destroyed. | 44 // A WebMediaPlayer is being created or destroyed. |
| 34 // params: none. | 45 // params: none. |
| 35 WEBMEDIAPLAYER_CREATED, | 46 WEBMEDIAPLAYER_CREATED, |
| 36 WEBMEDIAPLAYER_DESTROYED, | 47 WEBMEDIAPLAYER_DESTROYED, |
| 37 | 48 |
| 38 // A media player is loading a resource. | 49 // A media player is loading a resource. |
| 39 // params: "url": <URL of the resource>. | 50 // params: "url": <URL of the resource>. |
| 40 LOAD, | 51 LOAD, |
| 41 | 52 |
| 42 // A media player has started seeking. | 53 // A media player has started seeking. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 114 |
| 104 int32_t id; | 115 int32_t id; |
| 105 Type type; | 116 Type type; |
| 106 base::DictionaryValue params; | 117 base::DictionaryValue params; |
| 107 base::TimeTicks time; | 118 base::TimeTicks time; |
| 108 }; | 119 }; |
| 109 | 120 |
| 110 } // namespace media | 121 } // namespace media |
| 111 | 122 |
| 112 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 123 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
| OLD | NEW |