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 #include "content/browser/media/media_internals.h" | 5 #include "content/browser/media/media_internals.h" |
6 | 6 |
7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 class AudioLogImpl : public media::AudioLog { | 66 class AudioLogImpl : public media::AudioLog { |
67 public: | 67 public: |
68 AudioLogImpl(int owner_id, | 68 AudioLogImpl(int owner_id, |
69 media::AudioLogFactory::AudioComponent component, | 69 media::AudioLogFactory::AudioComponent component, |
70 content::MediaInternals* media_internals); | 70 content::MediaInternals* media_internals); |
71 virtual ~AudioLogImpl(); | 71 virtual ~AudioLogImpl(); |
72 | 72 |
73 virtual void OnCreated(int component_id, | 73 virtual void OnCreated(int component_id, |
74 const media::AudioParameters& params, | 74 const media::AudioParameters& params, |
75 const std::string& device_id) OVERRIDE; | 75 const std::string& device_id) override; |
76 virtual void OnStarted(int component_id) OVERRIDE; | 76 virtual void OnStarted(int component_id) override; |
77 virtual void OnStopped(int component_id) OVERRIDE; | 77 virtual void OnStopped(int component_id) override; |
78 virtual void OnClosed(int component_id) OVERRIDE; | 78 virtual void OnClosed(int component_id) override; |
79 virtual void OnError(int component_id) OVERRIDE; | 79 virtual void OnError(int component_id) override; |
80 virtual void OnSetVolume(int component_id, double volume) OVERRIDE; | 80 virtual void OnSetVolume(int component_id, double volume) override; |
81 | 81 |
82 private: | 82 private: |
83 void SendSingleStringUpdate(int component_id, | 83 void SendSingleStringUpdate(int component_id, |
84 const std::string& key, | 84 const std::string& key, |
85 const std::string& value); | 85 const std::string& value); |
86 void StoreComponentMetadata(int component_id, base::DictionaryValue* dict); | 86 void StoreComponentMetadata(int component_id, base::DictionaryValue* dict); |
87 std::string FormatCacheKey(int component_id); | 87 std::string FormatCacheKey(int component_id); |
88 | 88 |
89 const int owner_id_; | 89 const int owner_id_; |
90 const media::AudioLogFactory::AudioComponent component_; | 90 const media::AudioLogFactory::AudioComponent component_; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 const std::string& function, | 266 const std::string& function, |
267 const base::DictionaryValue* value) { | 267 const base::DictionaryValue* value) { |
268 SendUpdate(SerializeUpdate(function, value)); | 268 SendUpdate(SerializeUpdate(function, value)); |
269 | 269 |
270 base::AutoLock auto_lock(lock_); | 270 base::AutoLock auto_lock(lock_); |
271 scoped_ptr<base::Value> out_value; | 271 scoped_ptr<base::Value> out_value; |
272 CHECK(cached_data_.Remove(cache_key, &out_value)); | 272 CHECK(cached_data_.Remove(cache_key, &out_value)); |
273 } | 273 } |
274 | 274 |
275 } // namespace content | 275 } // namespace content |
OLD | NEW |