| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/plugin_prefs.h" | 23 #include "chrome/browser/plugin_prefs.h" |
| 24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 25 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 25 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| 26 #include "chrome/browser/ui/webui/crashes_ui.h" | 26 #include "chrome/browser/ui/webui/crashes_ui.h" |
| 27 #include "chrome/common/chrome_version_info.h" | 27 #include "chrome/common/chrome_version_info.h" |
| 28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 29 #include "content/browser/gpu/gpu_data_manager.h" | 29 #include "content/browser/gpu/gpu_data_manager.h" |
| 30 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 31 #include "content/public/browser/plugin_service.h" | 31 #include "content/public/browser/plugin_service.h" |
| 32 #include "content/public/browser/user_metrics.h" | 32 #include "content/public/browser/user_metrics.h" |
| 33 #include "content/public/browser/web_ui_message_handler.h" |
| 33 #include "grit/browser_resources.h" | 34 #include "grit/browser_resources.h" |
| 34 #include "grit/chromium_strings.h" | 35 #include "grit/chromium_strings.h" |
| 35 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 36 #include "grit/theme_resources.h" | 37 #include "grit/theme_resources.h" |
| 37 #include "ui/base/l10n/l10n_util.h" | 38 #include "ui/base/l10n/l10n_util.h" |
| 38 #include "ui/base/resource/resource_bundle.h" | 39 #include "ui/base/resource/resource_bundle.h" |
| 39 #include "webkit/plugins/webplugininfo.h" | 40 #include "webkit/plugins/webplugininfo.h" |
| 40 | 41 |
| 41 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
| 42 #include "base/win/windows_version.h" | 43 #include "base/win/windows_version.h" |
| 43 #endif | 44 #endif |
| 44 | 45 |
| 45 using content::PluginService; | 46 using content::PluginService; |
| 46 using content::UserMetricsAction; | 47 using content::UserMetricsAction; |
| 47 using content::WebContents; | 48 using content::WebContents; |
| 49 using content::WebUIMessageHandler; |
| 48 | 50 |
| 49 namespace { | 51 namespace { |
| 50 | 52 |
| 51 ChromeWebUIDataSource* CreateFlashUIHTMLSource() { | 53 ChromeWebUIDataSource* CreateFlashUIHTMLSource() { |
| 52 ChromeWebUIDataSource* source = | 54 ChromeWebUIDataSource* source = |
| 53 new ChromeWebUIDataSource(chrome::kChromeUIFlashHost); | 55 new ChromeWebUIDataSource(chrome::kChromeUIFlashHost); |
| 54 | 56 |
| 55 source->AddLocalizedString("loadingMessage", IDS_FLASH_LOADING_MESSAGE); | 57 source->AddLocalizedString("loadingMessage", IDS_FLASH_LOADING_MESSAGE); |
| 56 source->AddLocalizedString("flashLongTitle", IDS_FLASH_TITLE_MESSAGE); | 58 source->AddLocalizedString("flashLongTitle", IDS_FLASH_TITLE_MESSAGE); |
| 57 source->set_json_path("strings.js"); | 59 source->set_json_path("strings.js"); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // Set up the about:flash source. | 376 // Set up the about:flash source. |
| 375 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); | 377 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); |
| 376 profile->GetChromeURLDataManager()->AddDataSource(CreateFlashUIHTMLSource()); | 378 profile->GetChromeURLDataManager()->AddDataSource(CreateFlashUIHTMLSource()); |
| 377 } | 379 } |
| 378 | 380 |
| 379 // static | 381 // static |
| 380 RefCountedMemory* FlashUI::GetFaviconResourceBytes() { | 382 RefCountedMemory* FlashUI::GetFaviconResourceBytes() { |
| 381 // Use the default icon for now. | 383 // Use the default icon for now. |
| 382 return NULL; | 384 return NULL; |
| 383 } | 385 } |
| OLD | NEW |