OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/version_handler_chromeos.h" | 5 #include "chrome/browser/ui/webui/version_handler_chromeos.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/task_scheduler/post_task.h" | 8 #include "base/task_scheduler/post_task.h" |
9 #include "content/public/browser/web_ui.h" | 9 #include "content/public/browser/web_ui.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 base::TaskPriority::BACKGROUND), | 33 base::TaskPriority::BACKGROUND), |
34 base::Bind(&chromeos::version_loader::GetARCVersion), | 34 base::Bind(&chromeos::version_loader::GetARCVersion), |
35 base::Bind(&VersionHandlerChromeOS::OnARCVersion, | 35 base::Bind(&VersionHandlerChromeOS::OnARCVersion, |
36 weak_factory_.GetWeakPtr())); | 36 weak_factory_.GetWeakPtr())); |
37 | 37 |
38 // Parent class takes care of the rest. | 38 // Parent class takes care of the rest. |
39 VersionHandler::HandleRequestVersionInfo(args); | 39 VersionHandler::HandleRequestVersionInfo(args); |
40 } | 40 } |
41 | 41 |
42 void VersionHandlerChromeOS::OnVersion(const std::string& version) { | 42 void VersionHandlerChromeOS::OnVersion(const std::string& version) { |
43 base::StringValue arg(version); | 43 base::Value arg(version); |
44 web_ui()->CallJavascriptFunctionUnsafe("returnOsVersion", arg); | 44 web_ui()->CallJavascriptFunctionUnsafe("returnOsVersion", arg); |
45 } | 45 } |
46 | 46 |
47 void VersionHandlerChromeOS::OnOSFirmware(const std::string& version) { | 47 void VersionHandlerChromeOS::OnOSFirmware(const std::string& version) { |
48 base::StringValue arg(version); | 48 base::Value arg(version); |
49 web_ui()->CallJavascriptFunctionUnsafe("returnOsFirmwareVersion", arg); | 49 web_ui()->CallJavascriptFunctionUnsafe("returnOsFirmwareVersion", arg); |
50 } | 50 } |
51 | 51 |
52 void VersionHandlerChromeOS::OnARCVersion(const std::string& version) { | 52 void VersionHandlerChromeOS::OnARCVersion(const std::string& version) { |
53 base::StringValue arg(version); | 53 base::Value arg(version); |
54 web_ui()->CallJavascriptFunctionUnsafe("returnARCVersion", arg); | 54 web_ui()->CallJavascriptFunctionUnsafe("returnARCVersion", arg); |
55 } | 55 } |
OLD | NEW |