| 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/nacl_ui.h" | 5 #include "chrome/browser/ui/webui/nacl_ui.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 std::unique_ptr<base::ListValue> list(new base::ListValue()); | 313 std::unique_ptr<base::ListValue> list(new base::ListValue()); |
| 314 // Display the operating system and chrome version information. | 314 // Display the operating system and chrome version information. |
| 315 AddOperatingSystemInfo(list.get()); | 315 AddOperatingSystemInfo(list.get()); |
| 316 // Display the list of plugins serving NaCl. | 316 // Display the list of plugins serving NaCl. |
| 317 AddPluginList(list.get()); | 317 AddPluginList(list.get()); |
| 318 // Display information relevant to PNaCl. | 318 // Display information relevant to PNaCl. |
| 319 AddPnaclInfo(list.get()); | 319 AddPnaclInfo(list.get()); |
| 320 // Display information relevant to NaCl (non-portable. | 320 // Display information relevant to NaCl (non-portable. |
| 321 AddNaClInfo(list.get()); | 321 AddNaClInfo(list.get()); |
| 322 // naclInfo will take ownership of list, and clean it up on destruction. | 322 // naclInfo will take ownership of list, and clean it up on destruction. |
| 323 naclInfo->Set("naclInfo", list.release()); | 323 naclInfo->Set("naclInfo", std::move(list)); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void NaClDomHandler::DidCheckPathAndVersion(const std::string* version, | 326 void NaClDomHandler::DidCheckPathAndVersion(const std::string* version, |
| 327 bool is_valid) { | 327 bool is_valid) { |
| 328 pnacl_path_validated_ = true; | 328 pnacl_path_validated_ = true; |
| 329 pnacl_path_exists_ = is_valid; | 329 pnacl_path_exists_ = is_valid; |
| 330 pnacl_version_string_ = *version; | 330 pnacl_version_string_ = *version; |
| 331 MaybeRespondToPage(); | 331 MaybeRespondToPage(); |
| 332 } | 332 } |
| 333 | 333 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 | 389 |
| 390 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 390 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 391 base::RecordAction(UserMetricsAction("ViewAboutNaCl")); | 391 base::RecordAction(UserMetricsAction("ViewAboutNaCl")); |
| 392 | 392 |
| 393 web_ui->AddMessageHandler(base::MakeUnique<NaClDomHandler>()); | 393 web_ui->AddMessageHandler(base::MakeUnique<NaClDomHandler>()); |
| 394 | 394 |
| 395 // Set up the about:nacl source. | 395 // Set up the about:nacl source. |
| 396 Profile* profile = Profile::FromWebUI(web_ui); | 396 Profile* profile = Profile::FromWebUI(web_ui); |
| 397 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); | 397 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); |
| 398 } | 398 } |
| OLD | NEW |