Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1337)

Side by Side Diff: chrome/browser/ui/webui/nacl_ui.cc

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 FROM_HERE, 365 FROM_HERE,
366 base::Bind(&CheckPathAndVersion, version_string), 366 base::Bind(&CheckPathAndVersion, version_string),
367 base::Bind(&NaClDomHandler::DidCheckPathAndVersion, 367 base::Bind(&NaClDomHandler::DidCheckPathAndVersion,
368 weak_ptr_factory_.GetWeakPtr(), 368 weak_ptr_factory_.GetWeakPtr(),
369 base::Owned(version_string))); 369 base::Owned(version_string)));
370 return; 370 return;
371 } 371 }
372 372
373 base::DictionaryValue naclInfo; 373 base::DictionaryValue naclInfo;
374 PopulatePageInformation(&naclInfo); 374 PopulatePageInformation(&naclInfo);
375 web_ui()->CallJavascriptFunction("nacl.returnNaClInfo", naclInfo); 375 web_ui()->CallJavascriptFunctionUnsafe("nacl.returnNaClInfo", naclInfo);
376 } 376 }
377 377
378 } // namespace 378 } // namespace
379 379
380 /////////////////////////////////////////////////////////////////////////////// 380 ///////////////////////////////////////////////////////////////////////////////
381 // 381 //
382 // NaClUI 382 // NaClUI
383 // 383 //
384 /////////////////////////////////////////////////////////////////////////////// 384 ///////////////////////////////////////////////////////////////////////////////
385 385
386 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) { 386 NaClUI::NaClUI(content::WebUI* web_ui) : WebUIController(web_ui) {
387 content::RecordAction(UserMetricsAction("ViewAboutNaCl")); 387 content::RecordAction(UserMetricsAction("ViewAboutNaCl"));
388 388
389 web_ui->AddMessageHandler(new NaClDomHandler()); 389 web_ui->AddMessageHandler(new NaClDomHandler());
390 390
391 // Set up the about:nacl source. 391 // Set up the about:nacl source.
392 Profile* profile = Profile::FromWebUI(web_ui); 392 Profile* profile = Profile::FromWebUI(web_ui);
393 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource()); 393 content::WebUIDataSource::Add(profile, CreateNaClUIHTMLSource());
394 } 394 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc ('k') | chrome/browser/ui/webui/net_export_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698