| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 #include "chrome/browser/ui/webui/version_handler_chromeos.h" |
| 6 |
| 7 #include "content/public/browser/web_ui.h" |
| 8 |
| 9 VersionHandlerChromeOS::VersionHandlerChromeOS() { |
| 10 } |
| 11 |
| 12 VersionHandlerChromeOS::~VersionHandlerChromeOS() { |
| 13 } |
| 14 |
| 15 void VersionHandlerChromeOS::HandleRequestVersionInfo(const ListValue* args) { |
| 16 // Start the asynchronous load of the version. |
| 17 loader_.GetVersion(&consumer_, |
| 18 base::Bind(&VersionHandlerChromeOS::OnVersion, |
| 19 base::Unretained(this)), |
| 20 chromeos::VersionLoader::VERSION_FULL); |
| 21 |
| 22 // Parent class takes care of the rest. |
| 23 VersionHandler::HandleRequestVersionInfo(args); |
| 24 } |
| 25 |
| 26 void VersionHandlerChromeOS::OnVersion(chromeos::VersionLoader::Handle handle, |
| 27 const std::string& version) { |
| 28 StringValue arg(version); |
| 29 web_ui()->CallJavascriptFunction("returnOsVersion", arg); |
| 30 } |
| OLD | NEW |