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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 using content::WebUIMessageHandler; | 55 using content::WebUIMessageHandler; |
56 | 56 |
57 namespace { | 57 namespace { |
58 | 58 |
59 const char kFlashPlugin[] = "Flash plugin"; | 59 const char kFlashPlugin[] = "Flash plugin"; |
60 | 60 |
61 ChromeWebUIDataSource* CreateFlashUIHTMLSource() { | 61 ChromeWebUIDataSource* CreateFlashUIHTMLSource() { |
62 ChromeWebUIDataSource* source = | 62 ChromeWebUIDataSource* source = |
63 new ChromeWebUIDataSource(chrome::kChromeUIFlashHost); | 63 new ChromeWebUIDataSource(chrome::kChromeUIFlashHost); |
64 | 64 |
| 65 source->set_use_json_js_format_v2(); |
65 source->AddLocalizedString("loadingMessage", IDS_FLASH_LOADING_MESSAGE); | 66 source->AddLocalizedString("loadingMessage", IDS_FLASH_LOADING_MESSAGE); |
66 source->AddLocalizedString("flashLongTitle", IDS_FLASH_TITLE_MESSAGE); | 67 source->AddLocalizedString("flashLongTitle", IDS_FLASH_TITLE_MESSAGE); |
67 source->set_json_path("strings.js"); | 68 source->set_json_path("strings.js"); |
68 source->add_resource_path("about_flash.js", IDR_ABOUT_FLASH_JS); | 69 source->add_resource_path("about_flash.js", IDR_ABOUT_FLASH_JS); |
69 source->set_default_resource(IDR_ABOUT_FLASH_HTML); | 70 source->set_default_resource(IDR_ABOUT_FLASH_HTML); |
70 return source; | 71 return source; |
71 } | 72 } |
72 | 73 |
73 const int kTimeout = 8 * 1000; // 8 seconds. | 74 const int kTimeout = 8 * 1000; // 8 seconds. |
74 | 75 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 Profile* profile = Profile::FromWebUI(web_ui); | 390 Profile* profile = Profile::FromWebUI(web_ui); |
390 ChromeURLDataManager::AddDataSource(profile, CreateFlashUIHTMLSource()); | 391 ChromeURLDataManager::AddDataSource(profile, CreateFlashUIHTMLSource()); |
391 } | 392 } |
392 | 393 |
393 // static | 394 // static |
394 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( | 395 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( |
395 ui::ScaleFactor scale_factor) { | 396 ui::ScaleFactor scale_factor) { |
396 // Use the default icon for now. | 397 // Use the default icon for now. |
397 return NULL; | 398 return NULL; |
398 } | 399 } |
OLD | NEW |