| 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/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 Loading... |
| 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 } |
| OLD | NEW |