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

Side by Side Diff: chrome/browser/ui/webui/flash_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
« no previous file with comments | « chrome/browser/ui/webui/flags_ui.cc ('k') | chrome/browser/ui/webui/foreign_session_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/flash_ui.h" 5 #include "chrome/browser/ui/webui/flash_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 AddPair(list, 366 AddPair(list,
367 ASCIIToUTF16("Vertex shader version"), 367 ASCIIToUTF16("Vertex shader version"),
368 gpu_info.vertex_shader_version); 368 gpu_info.vertex_shader_version);
369 AddPair(list, ASCIIToUTF16("GL_VENDOR"), gpu_info.gl_vendor); 369 AddPair(list, ASCIIToUTF16("GL_VENDOR"), gpu_info.gl_vendor);
370 AddPair(list, ASCIIToUTF16("GL_RENDERER"), gpu_info.gl_renderer); 370 AddPair(list, ASCIIToUTF16("GL_RENDERER"), gpu_info.gl_renderer);
371 AddPair(list, ASCIIToUTF16("GL_VERSION"), gpu_info.gl_version); 371 AddPair(list, ASCIIToUTF16("GL_VERSION"), gpu_info.gl_version);
372 AddPair(list, ASCIIToUTF16("GL_EXTENSIONS"), gpu_info.gl_extensions); 372 AddPair(list, ASCIIToUTF16("GL_EXTENSIONS"), gpu_info.gl_extensions);
373 373
374 base::DictionaryValue flashInfo; 374 base::DictionaryValue flashInfo;
375 flashInfo.Set("flashInfo", list); 375 flashInfo.Set("flashInfo", list);
376 web_ui()->CallJavascriptFunction("returnFlashInfo", flashInfo); 376 web_ui()->CallJavascriptFunctionUnsafe("returnFlashInfo", flashInfo);
377 } 377 }
378 378
379 } // namespace 379 } // namespace
380 380
381 /////////////////////////////////////////////////////////////////////////////// 381 ///////////////////////////////////////////////////////////////////////////////
382 // 382 //
383 // FlashUI 383 // FlashUI
384 // 384 //
385 /////////////////////////////////////////////////////////////////////////////// 385 ///////////////////////////////////////////////////////////////////////////////
386 386
387 FlashUI::FlashUI(content::WebUI* web_ui) : WebUIController(web_ui) { 387 FlashUI::FlashUI(content::WebUI* web_ui) : WebUIController(web_ui) {
388 content::RecordAction( 388 content::RecordAction(
389 UserMetricsAction("ViewAboutFlash")); 389 UserMetricsAction("ViewAboutFlash"));
390 390
391 web_ui->AddMessageHandler(new FlashDOMHandler()); 391 web_ui->AddMessageHandler(new FlashDOMHandler());
392 392
393 // Set up the about:flash source. 393 // Set up the about:flash source.
394 Profile* profile = Profile::FromWebUI(web_ui); 394 Profile* profile = Profile::FromWebUI(web_ui);
395 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); 395 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource());
396 } 396 }
397 397
398 // static 398 // static
399 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( 399 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes(
400 ui::ScaleFactor scale_factor) { 400 ui::ScaleFactor scale_factor) {
401 // Use the default icon for now. 401 // Use the default icon for now.
402 return NULL; 402 return NULL;
403 } 403 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/flags_ui.cc ('k') | chrome/browser/ui/webui/foreign_session_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698