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 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 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void DeleteItem(const std::string& item); | 72 void DeleteItem(const std::string& item); |
73 | 73 |
74 // Sets data_.id.property = value and notifies attached UIs using update_fn. | 74 // Sets data_.id.property = value and notifies attached UIs using update_fn. |
75 // id may be any depth, e.g. "video.decoders.1.2.3" | 75 // id may be any depth, e.g. "video.decoders.1.2.3" |
76 void UpdateItem(const std::string& update_fn, const std::string& id, | 76 void UpdateItem(const std::string& update_fn, const std::string& id, |
77 const std::string& property, Value* value); | 77 const std::string& property, Value* value); |
78 | 78 |
79 // Calls javascript |function|(|value|) on each attached UI. | 79 // Calls javascript |function|(|value|) on each attached UI. |
80 void SendUpdate(const std::string& function, Value* value); | 80 void SendUpdate(const std::string& function, Value* value); |
81 | 81 |
82 static MediaInternals* instance_; | |
83 DictionaryValue data_; | 82 DictionaryValue data_; |
84 ObserverList<MediaInternalsObserver> observers_; | 83 ObserverList<MediaInternalsObserver> observers_; |
85 scoped_refptr<MediaStreamCaptureIndicator> media_stream_capture_indicator_; | 84 scoped_refptr<MediaStreamCaptureIndicator> media_stream_capture_indicator_; |
86 | 85 |
87 DISALLOW_COPY_AND_ASSIGN(MediaInternals); | 86 DISALLOW_COPY_AND_ASSIGN(MediaInternals); |
88 }; | 87 }; |
89 | 88 |
90 #endif // CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_ | 89 #endif // CHROME_BROWSER_MEDIA_MEDIA_INTERNALS_H_ |
OLD | NEW |