This source file includes following definitions.
- HandleRequestVersionInfo
- OnVersion
#include "chrome/browser/ui/webui/version_handler_chromeos.h"
#include "base/bind.h"
#include "content/public/browser/web_ui.h"
VersionHandlerChromeOS::VersionHandlerChromeOS() {
}
VersionHandlerChromeOS::~VersionHandlerChromeOS() {
}
void VersionHandlerChromeOS::HandleRequestVersionInfo(
const base::ListValue* args) {
loader_.GetVersion(
chromeos::VersionLoader::VERSION_FULL,
base::Bind(&VersionHandlerChromeOS::OnVersion, base::Unretained(this)),
&tracker_);
VersionHandler::HandleRequestVersionInfo(args);
}
void VersionHandlerChromeOS::OnVersion(const std::string& version) {
base::StringValue arg(version);
web_ui()->CallJavascriptFunction("returnOsVersion", arg);
}