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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/version_handler_chromeos.h"
8 #include "content/public/browser/web_ui.h"
10 VersionHandlerChromeOS::VersionHandlerChromeOS() {
13 VersionHandlerChromeOS::~VersionHandlerChromeOS() {
16 void VersionHandlerChromeOS::HandleRequestVersionInfo(
17 const base::ListValue
* args
) {
18 // Start the asynchronous load of the version.
20 chromeos::VersionLoader::VERSION_FULL
,
21 base::Bind(&VersionHandlerChromeOS::OnVersion
, base::Unretained(this)),
24 // Parent class takes care of the rest.
25 VersionHandler::HandleRequestVersionInfo(args
);
28 void VersionHandlerChromeOS::OnVersion(const std::string
& version
) {
29 base::StringValue
arg(version
);
30 web_ui()->CallJavascriptFunction("returnOsVersion", arg
);