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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 ASCIIToUTF16("PNaCl translator path"), | 331 ASCIIToUTF16("PNaCl translator path"), |
332 pnacl_path.LossyDisplayName()); | 332 pnacl_path.LossyDisplayName()); |
333 // Version string is part of the directory name: | 333 // Version string is part of the directory name: |
334 // pnacl/<version>/_platform_specific/<arch>/[files] | 334 // pnacl/<version>/_platform_specific/<arch>/[files] |
335 // Keep in sync with pnacl_component_installer.cc. | 335 // Keep in sync with pnacl_component_installer.cc. |
336 AddPair(list.get(), | 336 AddPair(list.get(), |
337 ASCIIToUTF16("PNaCl translator version"), | 337 ASCIIToUTF16("PNaCl translator version"), |
338 pnacl_path.DirName().DirName().BaseName().LossyDisplayName()); | 338 pnacl_path.DirName().DirName().BaseName().LossyDisplayName()); |
339 } | 339 } |
340 | 340 |
341 ListFlagStatus(list.get(), "Flag '--enable-pnacl'", switches::kEnablePnacl); | 341 ListFlagStatus(list.get(), "Flag '--disable-pnacl'", switches::kDisablePnacl); |
342 // naclInfo will take ownership of list, and clean it up on destruction. | 342 // naclInfo will take ownership of list, and clean it up on destruction. |
343 naclInfo->Set("naclInfo", list.release()); | 343 naclInfo->Set("naclInfo", list.release()); |
344 } | 344 } |
345 | 345 |
346 void NaClDomHandler::DidValidatePnaclPath(bool is_valid) { | 346 void NaClDomHandler::DidValidatePnaclPath(bool is_valid) { |
347 pnacl_path_validated_ = true; | 347 pnacl_path_validated_ = true; |
348 pnacl_path_exists_ = is_valid; | 348 pnacl_path_exists_ = is_valid; |
349 MaybeRespondToPage(); | 349 MaybeRespondToPage(); |
350 } | 350 } |
351 | 351 |
(...skipping 24 matching lines...) Expand all Loading... |
376 | 376 |
377 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 377 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
378 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); | 378 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); |
379 | 379 |
380 web_ui->AddMessageHandler(new NaClDomHandler()); | 380 web_ui->AddMessageHandler(new NaClDomHandler()); |
381 | 381 |
382 // Set up the about:nacl source. | 382 // Set up the about:nacl source. |
383 Profile* profile = Profile::FromWebUI(web_ui); | 383 Profile* profile = Profile::FromWebUI(web_ui); |
384 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); | 384 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); |
385 } | 385 } |
OLD | NEW |