Index: content/browser/media/media_internals.cc |
=================================================================== |
--- content/browser/media/media_internals.cc (revision 181443) |
+++ content/browser/media/media_internals.cc (working copy) |
@@ -31,21 +31,21 @@ |
void* host, int stream_id, bool playing) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
UpdateAudioStream(host, stream_id, |
- "playing", Value::CreateBooleanValue(playing)); |
+ "playing", new base::FundamentalValue(playing)); |
} |
void MediaInternals::OnSetAudioStreamStatus( |
void* host, int stream_id, const std::string& status) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
UpdateAudioStream(host, stream_id, |
- "status", Value::CreateStringValue(status)); |
+ "status", new base::StringValue(status)); |
} |
void MediaInternals::OnSetAudioStreamVolume( |
void* host, int stream_id, double volume) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
UpdateAudioStream(host, stream_id, |
- "volume", Value::CreateDoubleValue(volume)); |
+ "volume", new base::FundamentalValue(volume)); |
} |
void MediaInternals::OnMediaEvent( |
@@ -53,7 +53,7 @@ |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
// Notify observers that |event| has occured. |
- DictionaryValue dict; |
+ base::DictionaryValue dict; |
dict.SetInteger("renderer", render_process_id); |
dict.SetInteger("player", event.id); |
dict.SetString("type", media::MediaLog::EventTypeToString(event.type)); |
@@ -84,8 +84,10 @@ |
MediaInternals::MediaInternals() { |
} |
-void MediaInternals::UpdateAudioStream( |
- void* host, int stream_id, const std::string& property, Value* value) { |
+void MediaInternals::UpdateAudioStream(void* host, |
+ int stream_id, |
+ const std::string& property, |
+ base::Value* value) { |
std::string stream = base::StringPrintf("audio_streams.%p:%d", |
host, stream_id); |
UpdateItem("media.addAudioStream", stream, property, value); |
@@ -93,16 +95,16 @@ |
void MediaInternals::DeleteItem(const std::string& item) { |
data_.Remove(item, NULL); |
- scoped_ptr<Value> value(Value::CreateStringValue(item)); |
+ scoped_ptr<base::Value> value(new base::StringValue(item)); |
SendUpdate("media.onItemDeleted", value.get()); |
} |
void MediaInternals::UpdateItem( |
const std::string& update_fn, const std::string& id, |
- const std::string& property, Value* value) { |
- DictionaryValue* item_properties; |
+ const std::string& property, base::Value* value) { |
+ base::DictionaryValue* item_properties; |
if (!data_.GetDictionary(id, &item_properties)) { |
- item_properties = new DictionaryValue(); |
+ item_properties = new base::DictionaryValue(); |
data_.Set(id, item_properties); |
item_properties->SetString("id", id); |
} |
@@ -110,12 +112,13 @@ |
SendUpdate(update_fn, item_properties); |
} |
-void MediaInternals::SendUpdate(const std::string& function, Value* value) { |
+void MediaInternals::SendUpdate(const std::string& function, |
+ base::Value* value) { |
// Only bother serializing the update to JSON if someone is watching. |
if (update_callbacks_.empty()) |
return; |
- std::vector<const Value*> args; |
+ std::vector<const base::Value*> args; |
args.push_back(value); |
string16 update = WebUI::GetJavascriptCall(function, args); |
for (size_t i = 0; i < update_callbacks_.size(); i++) |