summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 08:50:56 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 08:50:56 +0000
commit7eb20e39b770ec5d8eb118133cfc5ed291be0e0e (patch)
treec47cb63b276f1b02b8c5aadc3d6fbcd4d620f33d /apps
parent1788ebba6cc645af4bea3e84ef5ab2c178496a81 (diff)
downloadchromium_src-7eb20e39b770ec5d8eb118133cfc5ed291be0e0e.zip
chromium_src-7eb20e39b770ec5d8eb118133cfc5ed291be0e0e.tar.gz
chromium_src-7eb20e39b770ec5d8eb118133cfc5ed291be0e0e.tar.bz2
Break src/extensions dependency on Chrome's theme_resources.h / .pak
* Move GetDefaultAppIcon and GetDefaultExtensionIcon out of src/extensions into chrome/browser. * Inline one call to GetDefaultAppIcon in src/apps This requires a DEPS exception in src/apps for grit/theme_resources.h, but that's better than having one in src/extensions (as src/apps is much higher in the dependency tree). No functional changes. BUG=368334 TEST=Clean build of extensions_unittests succeeds, Chrome about:extensions still displays default icon for extension with no icon. TBR=msw@chromium.org for mechanical namespace/include changes in chrome/browser/ui/views/ Review URL: https://codereview.chromium.org/259343002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/DEPS4
-rw-r--r--apps/app_window.cc7
-rw-r--r--apps/shell/app_shell.gyp6
3 files changed, 10 insertions, 7 deletions
diff --git a/apps/DEPS b/apps/DEPS
index 03c332c..cbc341d 100644
--- a/apps/DEPS
+++ b/apps/DEPS
@@ -24,6 +24,9 @@ include_rules = [
"+chrome/browser/sessions/session_id.h",
"+chrome/common/chrome_switches.h",
+ # For default app icon.
+ "!grit/theme_resources.h",
+
# Pieces of the extensions system that need to move to src/extensions.
# See http://crbug.com/162530 for details.
"+chrome/browser/extensions/api/file_handlers/app_file_handler_util.h",
@@ -33,7 +36,6 @@ include_rules = [
"+chrome/browser/extensions/suggest_permission_util.h",
"+chrome/browser/extensions/unpacked_installer.h",
"+chrome/common/extensions/api/app_window.h",
- "+chrome/common/extensions/manifest_handlers/icons_handler.h",
]
specific_include_rules = {
diff --git a/apps/app_window.cc b/apps/app_window.cc
index 0664548..cfb1213 100644
--- a/apps/app_window.cc
+++ b/apps/app_window.cc
@@ -40,7 +40,9 @@
#include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
+#include "grit/theme_resources.h"
#include "third_party/skia/include/core/SkRegion.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/screen.h"
#if !defined(OS_MACOSX)
@@ -783,12 +785,15 @@ void AppWindow::UpdateExtensionAppIcon() {
// Avoid using any previous app icons were being downloaded.
image_loader_ptr_factory_.InvalidateWeakPtrs();
+ const gfx::ImageSkia& default_icon =
+ *ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_APP_DEFAULT_ICON);
app_icon_image_.reset(
new extensions::IconImage(browser_context(),
extension(),
extensions::IconsInfo::GetIcons(extension()),
delegate_->PreferredIconSize(),
- extensions::IconsInfo::GetDefaultAppIcon(),
+ default_icon,
this));
// Triggers actual image loading with 1x resources. The 2x resource will
diff --git a/apps/shell/app_shell.gyp b/apps/shell/app_shell.gyp
index 720de6a..3e09a8f 100644
--- a/apps/shell/app_shell.gyp
+++ b/apps/shell/app_shell.gyp
@@ -14,8 +14,6 @@
# Need extension related resources in common_resources.pak and
# renderer_resources_100_percent.pak
'<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources',
- # Need app related resources in theme_resources_100_percent.pak
- '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources',
# Need dev-tools related resources in shell_resources.pak and
# devtools_resources.pak.
'<(DEPTH)/content/content_shell_and_tests.gyp:generate_content_shell_resources',
@@ -32,11 +30,9 @@
'<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.pak',
# TODO(jamescook): Extract the extension/app related resources
- # from generated_resources_en-US.pak and
- # theme_resources_100_percent.pak.
+ # from generated_resources_en-US.pak.
'<(SHARED_INTERMEDIATE_DIR)/chrome/generated_resources_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
- '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources_100_percent.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak',