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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 using content::WebUIMessageHandler; | 53 using content::WebUIMessageHandler; |
54 | 54 |
55 namespace { | 55 namespace { |
56 | 56 |
57 const char kFlashPlugin[] = "Flash plugin"; | 57 const char kFlashPlugin[] = "Flash plugin"; |
58 | 58 |
59 content::WebUIDataSource* CreateFlashUIHTMLSource() { | 59 content::WebUIDataSource* CreateFlashUIHTMLSource() { |
60 content::WebUIDataSource* source = | 60 content::WebUIDataSource* source = |
61 content::WebUIDataSource::Create(chrome::kChromeUIFlashHost); | 61 content::WebUIDataSource::Create(chrome::kChromeUIFlashHost); |
62 | 62 |
63 source->SetUseJsonJSFormatV2(); | |
64 source->AddLocalizedString("loadingMessage", IDS_FLASH_LOADING_MESSAGE); | 63 source->AddLocalizedString("loadingMessage", IDS_FLASH_LOADING_MESSAGE); |
65 source->AddLocalizedString("flashLongTitle", IDS_FLASH_TITLE_MESSAGE); | 64 source->AddLocalizedString("flashLongTitle", IDS_FLASH_TITLE_MESSAGE); |
66 source->SetJsonPath("strings.js"); | 65 source->SetJsonPath("strings.js"); |
67 source->AddResourcePath("about_flash.js", IDR_ABOUT_FLASH_JS); | 66 source->AddResourcePath("about_flash.js", IDR_ABOUT_FLASH_JS); |
68 source->SetDefaultResource(IDR_ABOUT_FLASH_HTML); | 67 source->SetDefaultResource(IDR_ABOUT_FLASH_HTML); |
69 return source; | 68 return source; |
70 } | 69 } |
71 | 70 |
72 const int kTimeout = 8 * 1000; // 8 seconds. | 71 const int kTimeout = 8 * 1000; // 8 seconds. |
73 | 72 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 Profile* profile = Profile::FromWebUI(web_ui); | 391 Profile* profile = Profile::FromWebUI(web_ui); |
393 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); | 392 content::WebUIDataSource::Add(profile, CreateFlashUIHTMLSource()); |
394 } | 393 } |
395 | 394 |
396 // static | 395 // static |
397 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( | 396 base::RefCountedMemory* FlashUI::GetFaviconResourceBytes( |
398 ui::ScaleFactor scale_factor) { | 397 ui::ScaleFactor scale_factor) { |
399 // Use the default icon for now. | 398 // Use the default icon for now. |
400 return NULL; | 399 return NULL; |
401 } | 400 } |
OLD | NEW |