Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / webui / version_handler_chromeos.cc
blob46f31ef16a74637ceb128a14e10fa935c68b8107
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"
7 #include "base/bind.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.
19 loader_.GetVersion(
20 chromeos::VersionLoader::VERSION_FULL,
21 base::Bind(&VersionHandlerChromeOS::OnVersion, base::Unretained(this)),
22 &tracker_);
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);