Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Side by Side Diff: media/base/media_log.h

Issue 7480032: Plumb media data from renderers up to MediaInternals in the browser process. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: s/MessageLoop/MessageLoopProxy Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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.
4
5 #ifndef MEDIA_BASE_MEDIA_LOG_H_
6 #define MEDIA_BASE_MEDIA_LOG_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "base/time.h"
11 #include "base/values.h"
12 #include "media/base/media_log_event.h"
13
14 namespace media {
15
16 class MediaLog : public base::RefCountedThreadSafe<MediaLog> {
17 public:
18
19 // Return a string to represent an EventType.
20 static const char* EventTypeToString(MediaLogEvent::Type type);
21
22 MediaLog();
23
24 // Methods called by loggers when events occur. These generate appropriate
25 // event parameters so the caller need not worry about them.
26 void Load(const std::string& url);
27
28 // Add an event to this log. Overriden by inheritors to actually do something
29 // with it.
30 // Takes ownership of |event|.
31 virtual void AddEvent(MediaLogEvent* event);
32
33 // Convenience method for adding an event with no parameters.
34 void AddEventOfType(MediaLogEvent::Type type);
35
36 // Convenience method for filling in common fields of a new event.
37 MediaLogEvent* CreateEvent(MediaLogEvent::Type type);
38
39 protected:
40 friend class base::RefCountedThreadSafe<MediaLog>;
41 virtual ~MediaLog();
42
43 private:
44 // A unique (to this process) id for this MediaLog.
45 int32 id_;
46
47 DISALLOW_COPY_AND_ASSIGN(MediaLog);
48 };
49
50 } // namespace media
51
52 #endif // MEDIA_BASE_MEDIA_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698