[Android] Always use pixels for gestures handled in ContentViewCore
[chromium-blink-merge.git] / media / base / media_log_event.h
blob3052d415c121b6bc22c6b987bf9d4aa4d76a7b56
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
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_MEDIA_LOG_EVENT_H_
6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_
8 #include "base/time/time.h"
9 #include "base/values.h"
11 namespace media {
13 struct MediaLogEvent {
14 MediaLogEvent() {}
16 MediaLogEvent(const MediaLogEvent& event) {
17 *this = event;
20 MediaLogEvent& operator=(const MediaLogEvent& event) {
21 id = event.id;
22 type = event.type;
23 scoped_ptr<base::DictionaryValue> event_copy(event.params.DeepCopy());
24 params.Swap(event_copy.get());
25 time = event.time;
26 return *this;
29 enum Type {
30 // A WebMediaPlayer is being created or destroyed.
31 // params: none.
32 WEBMEDIAPLAYER_CREATED,
33 WEBMEDIAPLAYER_DESTROYED,
35 // A Pipeline is being created or destroyed.
36 // params: none.
37 PIPELINE_CREATED,
38 PIPELINE_DESTROYED,
40 // A media player is loading a resource.
41 // params: "url": <URL of the resource>.
42 LOAD,
44 // A media player has started seeking.
45 // params: "seek_target": <number of seconds to which to seek>.
46 SEEK,
48 // A media player has been told to play or pause.
49 // params: none.
50 PLAY,
51 PAUSE,
53 // The state of Pipeline has changed.
54 // params: "pipeline_state": <string name of the state>.
55 PIPELINE_STATE_CHANGED,
57 // An error has occurred in the pipeline.
58 // params: "pipeline_error": <string name of the error>.
59 PIPELINE_ERROR,
61 // The size of the video has been determined.
62 // params: "width": <integral width of the video>.
63 // "height": <integral height of the video>.
64 VIDEO_SIZE_SET,
66 // A property of the pipeline has been set by a filter.
67 // These take a single parameter based upon the name of the event and of
68 // the appropriate type. e.g. DURATION_SET: "duration" of type TimeDelta.
69 DURATION_SET,
70 TOTAL_BYTES_SET,
71 NETWORK_ACTIVITY_SET,
73 // Audio/Video/Text stream playback has ended.
74 AUDIO_ENDED,
75 VIDEO_ENDED,
76 TEXT_ENDED,
78 // The audio renderer has been disabled.
79 // params: none.
80 AUDIO_RENDERER_DISABLED,
82 // The extents of the sliding buffer have changed.
83 // params: "buffer_start": <first buffered byte>.
84 // "buffer_current": <current offset>.
85 // "buffer_end": <last buffered byte>.
86 BUFFERED_EXTENTS_CHANGED,
88 // Errors reported by Media Source Extensions code.
89 MEDIA_SOURCE_ERROR,
90 // params: "error": Error string describing the error detected.
92 // A property has changed without any special event occurring.
93 PROPERTY_CHANGE,
96 int32 id;
97 Type type;
98 base::DictionaryValue params;
99 base::TimeTicks time;
102 } // namespace media
104 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_