| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/chrome_component_extension_resource_manager.
h" | 5 #include "chrome/browser/extensions/chrome_component_extension_resource_manager.
h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
| 12 #include "chrome/grit/chrome_unscaled_resources.h" | 12 #include "chrome/grit/chrome_unscaled_resources.h" |
| 13 #include "chrome/grit/component_extension_resources_map.h" | 13 #include "chrome/grit/component_extension_resources_map.h" |
| 14 #include "chrome/grit/theme_resources.h" | 14 #include "chrome/grit/theme_resources.h" |
| 15 | 15 |
| 16 #if defined(OS_CHROMEOS) | 16 #if defined(OS_CHROMEOS) |
| 17 #include "components/chrome_apps/chrome_apps_resource_util.h" | 17 #include "components/chrome_apps/chrome_apps_resource_util.h" |
| 18 #include "ui/file_manager/file_manager_resource_util.h" | 18 #include "ui/file_manager/file_manager_resource_util.h" |
| 19 #include "ui/file_manager/grit/file_manager_resources.h" |
| 19 #endif | 20 #endif |
| 20 | 21 |
| 21 #if defined(USE_AURA) | 22 #if defined(USE_AURA) |
| 22 #include "ui/keyboard/content/keyboard_content_util.h" | 23 #include "ui/keyboard/content/keyboard_content_util.h" |
| 23 #endif | 24 #endif |
| 24 | 25 |
| 25 namespace extensions { | 26 namespace extensions { |
| 26 | 27 |
| 27 ChromeComponentExtensionResourceManager:: | 28 ChromeComponentExtensionResourceManager:: |
| 28 ChromeComponentExtensionResourceManager() { | 29 ChromeComponentExtensionResourceManager() { |
| 29 static const GritResourceMap kExtraComponentExtensionResources[] = { | 30 static const GritResourceMap kExtraComponentExtensionResources[] = { |
| 30 {"web_store/webstore_icon_128.png", IDR_WEBSTORE_ICON}, | 31 {"web_store/webstore_icon_128.png", IDR_WEBSTORE_ICON}, |
| 31 {"web_store/webstore_icon_16.png", IDR_WEBSTORE_ICON_16}, | 32 {"web_store/webstore_icon_16.png", IDR_WEBSTORE_ICON_16}, |
| 32 {"chrome_app/product_logo_128.png", IDR_PRODUCT_LOGO_128}, | 33 {"chrome_app/product_logo_128.png", IDR_PRODUCT_LOGO_128}, |
| 33 {"chrome_app/product_logo_16.png", IDR_PRODUCT_LOGO_16}, | 34 {"chrome_app/product_logo_16.png", IDR_PRODUCT_LOGO_16}, |
| 34 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
| 35 {"webstore_widget/app/icons/icon_16.png", IDR_WEBSTORE_ICON_16}, | 36 {"webstore_widget/app/icons/icon_16.png", IDR_WEBSTORE_ICON_16}, |
| 36 {"webstore_widget/app/icons/icon_32.png", IDR_WEBSTORE_ICON_32}, | 37 {"webstore_widget/app/icons/icon_32.png", IDR_WEBSTORE_ICON_32}, |
| 37 {"webstore_widget/app/icons/icon_128.png", IDR_WEBSTORE_ICON}, | 38 {"webstore_widget/app/icons/icon_128.png", IDR_WEBSTORE_ICON}, |
| 39 #ifndef DISABLE_NACL |
| 40 {"zip_archiver/zip_archiver_pnacl.pexe.js", IDR_ZIP_ARCHIVER_PEXE}, |
| 41 #endif |
| 38 #endif | 42 #endif |
| 39 }; | 43 }; |
| 40 | 44 |
| 41 AddComponentResourceEntries( | 45 AddComponentResourceEntries( |
| 42 kComponentExtensionResources, | 46 kComponentExtensionResources, |
| 43 kComponentExtensionResourcesSize); | 47 kComponentExtensionResourcesSize); |
| 44 AddComponentResourceEntries( | 48 AddComponentResourceEntries( |
| 45 kExtraComponentExtensionResources, | 49 kExtraComponentExtensionResources, |
| 46 arraysize(kExtraComponentExtensionResources)); | 50 arraysize(kExtraComponentExtensionResources)); |
| 47 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 entries[i].name); | 105 entries[i].name); |
| 102 resource_path = resource_path.NormalizePathSeparators(); | 106 resource_path = resource_path.NormalizePathSeparators(); |
| 103 | 107 |
| 104 DCHECK(path_to_resource_id_.find(resource_path) == | 108 DCHECK(path_to_resource_id_.find(resource_path) == |
| 105 path_to_resource_id_.end()); | 109 path_to_resource_id_.end()); |
| 106 path_to_resource_id_[resource_path] = entries[i].value; | 110 path_to_resource_id_[resource_path] = entries[i].value; |
| 107 } | 111 } |
| 108 } | 112 } |
| 109 | 113 |
| 110 } // namespace extensions | 114 } // namespace extensions |
| OLD | NEW |