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 "base/time.h" | 8 #include "base/time.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 | 10 |
11 namespace media { | 11 namespace media { |
12 | 12 |
13 struct MediaLogEvent { | 13 struct MediaLogEvent { |
14 MediaLogEvent() {} | 14 MediaLogEvent() {} |
15 | 15 |
16 MediaLogEvent(const MediaLogEvent& event) { | 16 MediaLogEvent(const MediaLogEvent& event) { |
17 *this = event; | 17 *this = event; |
18 } | 18 } |
19 | 19 |
20 MediaLogEvent& operator=(const MediaLogEvent& event) { | 20 MediaLogEvent& operator=(const MediaLogEvent& event) { |
21 id = event.id; | 21 id = event.id; |
22 type = event.type; | 22 type = event.type; |
23 scoped_ptr<DictionaryValue> event_copy(event.params.DeepCopy()); | 23 scoped_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy()); |
24 params.Swap(event_copy.get()); | 24 params.Swap(event_copy.get()); |
25 time = event.time; | 25 time = event.time; |
26 return *this; | 26 return *this; |
27 } | 27 } |
28 | 28 |
29 enum Type { | 29 enum Type { |
30 // A WebMediaPlayer is being created or destroyed. | 30 // A WebMediaPlayer is being created or destroyed. |
31 // params: none. | 31 // params: none. |
32 WEBMEDIAPLAYER_CREATED, | 32 WEBMEDIAPLAYER_CREATED, |
33 WEBMEDIAPLAYER_DESTROYED, | 33 WEBMEDIAPLAYER_DESTROYED, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 int32 id; | 92 int32 id; |
93 Type type; | 93 Type type; |
94 base::DictionaryValue params; | 94 base::DictionaryValue params; |
95 base::Time time; | 95 base::Time time; |
96 }; | 96 }; |
97 | 97 |
98 } // namespace media | 98 } // namespace media |
99 | 99 |
100 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 100 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
OLD | NEW |