| 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_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "media/base/media_log.h" | 13 #include "media/base/media_log.h" |
| 14 | 14 |
| 15 namespace base { |
| 16 class TickClock; |
| 17 } |
| 18 |
| 15 namespace content { | 19 namespace content { |
| 16 | 20 |
| 17 // RenderMediaLog is an implementation of MediaLog that forwards events to the | 21 // RenderMediaLog is an implementation of MediaLog that forwards events to the |
| 18 // browser process, throttling as necessary. | 22 // browser process, throttling as necessary. |
| 19 // | 23 // |
| 20 // To minimize the number of events sent over the wire, only the latest event | 24 // To minimize the number of events sent over the wire, only the latest event |
| 21 // added is sent for high frequency events (e.g., BUFFERED_EXTENTS_CHANGED). | 25 // added is sent for high frequency events (e.g., BUFFERED_EXTENTS_CHANGED). |
| 22 // | 26 // |
| 23 // It must be constructed on the render thread. | 27 // It must be constructed on the render thread. |
| 24 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog { | 28 class CONTENT_EXPORT RenderMediaLog : public media::MediaLog { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 49 | 53 |
| 50 // Limits the number buffered extents changed events we send over IPC to one. | 54 // Limits the number buffered extents changed events we send over IPC to one. |
| 51 scoped_ptr<media::MediaLogEvent> last_buffered_extents_changed_event_; | 55 scoped_ptr<media::MediaLogEvent> last_buffered_extents_changed_event_; |
| 52 | 56 |
| 53 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog); | 57 DISALLOW_COPY_AND_ASSIGN(RenderMediaLog); |
| 54 }; | 58 }; |
| 55 | 59 |
| 56 } // namespace content | 60 } // namespace content |
| 57 | 61 |
| 58 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ | 62 #endif // CONTENT_RENDERER_MEDIA_RENDER_MEDIA_LOG_H_ |
| OLD | NEW |