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

Side by Side Diff: chrome/browser/media/media_internals.h

Issue 7602021: Make MediaInternals handle MediaLogEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_ 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_
6 #define CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_ 6 #define CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // (host, stream_id) is a unique id for the audio stream. 50 // (host, stream_id) is a unique id for the audio stream.
51 // |host| will never be dereferenced. 51 // |host| will never be dereferenced.
52 void UpdateAudioStream(void* host, int stream_id, 52 void UpdateAudioStream(void* host, int stream_id,
53 const std::string& property, Value* value); 53 const std::string& property, Value* value);
54 54
55 // Removes |item| from |data_|. 55 // Removes |item| from |data_|.
56 void DeleteItem(const std::string& item); 56 void DeleteItem(const std::string& item);
57 57
58 // Sets data_.id.property = value and notifies attached UIs using update_fn. 58 // Sets data_.id.property = value and notifies attached UIs using update_fn.
59 // id may be any depth, e.g. "video.decoders.1.2.3" 59 // id may be any depth, e.g. "video.decoders.1.2.3"
60 void UpdateItem(const std::string& update_fn, const std::string& id, 60 void SetItemProperty(const std::string& update_fn, const std::string& id,
61 const std::string& property, Value* value); 61 const std::string& property, Value* value);
62
63 // Merges |properties| into data_.id and notifies attached UIs using
64 // update_fn. Takes ownership of |properties|.
65 void SetItemProperties(const std::string& update_fn, const std::string& id,
66 DictionaryValue* properties);
62 67
63 // Calls javascript |function|(|value|) on each attached UI. 68 // Calls javascript |function|(|value|) on each attached UI.
64 void SendUpdate(const std::string& function, Value* value); 69 void SendUpdate(const std::string& function, Value* value);
65 70
66 static MediaInternals* instance_; 71 static MediaInternals* instance_;
67 DictionaryValue data_; 72 DictionaryValue data_;
68 ObserverList<MediaInternalsObserver> observers_; 73 ObserverList<MediaInternalsObserver> observers_;
69 74
70 DISALLOW_COPY_AND_ASSIGN(MediaInternals); 75 DISALLOW_COPY_AND_ASSIGN(MediaInternals);
71 }; 76 };
72 77
73 #endif // CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_ 78 #endif // CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/media_internals.cc » ('j') | chrome/browser/media/media_internals.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698