diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-26 23:08:04 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-26 23:08:04 +0000 |
commit | c4fd04f66481f170c64653fc3ff7a2c108b88367 (patch) | |
tree | 1fb9de7155a4367c2246d1c63db877b1d4ab6cfb | |
parent | 7d22ce5e526fc5f83711fe42a6753d43d5c21e9f (diff) | |
download | chromium_src-c4fd04f66481f170c64653fc3ff7a2c108b88367.zip chromium_src-c4fd04f66481f170c64653fc3ff7a2c108b88367.tar.gz chromium_src-c4fd04f66481f170c64653fc3ff7a2c108b88367.tar.bz2 |
mac: Remove nav.pdf in favor of IDR_DEFAULT_FAVICON.
Copy default_100/default_large_favicon.png to default_200/default_favicon.png
BUG=111101
TEST=Favicons on bookmark bar, in history menu, etc still look good
in both lodpi and hidpi.
TBR=sky
Review URL: https://chromiumcodereview.appspot.com/10662041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144313 0039d316-1c4b-4281-b951-d872f2087c98
31 files changed, 70 insertions, 32 deletions
diff --git a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm index 797d411..1adea6b 100644 --- a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm +++ b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.mm @@ -13,6 +13,8 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/profiles/profile.h" #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" +#include "grit/ui_resources_standard.h" +#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/mac/nsimage_cache.h" #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" @@ -348,8 +350,10 @@ bool PasteboardContainsBookmarks(PasteboardType type) { NSImage* DragImageForBookmark(NSImage* favicon, const string16& title) { // If no favicon, use a default. - if (!favicon) - favicon = gfx::GetCachedImageWithName(@"nav.pdf"); + if (!favicon) { + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + favicon = rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON); + } // If no title, just use icon. if (title.empty()) diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index c9edc1b..8e19789 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -95,7 +95,7 @@ #include "content/public/common/child_process_host.h" #include "content/public/common/content_descriptors.h" #include "grit/generated_resources.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "net/base/ssl_cert_request_info.h" #include "net/cookies/cookie_monster.h" #include "net/cookies/cookie_options.h" diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc index 5745be1..9957a9b 100644 --- a/chrome/browser/task_manager/task_manager.cc +++ b/chrome/browser/task_manager/task_manager.cc @@ -39,7 +39,7 @@ #include "content/public/common/result_codes.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/text/bytes_formatting.h" diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm index 0894c04..878fa2a 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm @@ -49,7 +49,7 @@ #include "content/public/browser/web_contents_view.h" #include "grit/generated_resources.h" #include "grit/theme_resources_standard.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/l10n/l10n_util_mac.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" @@ -250,7 +250,7 @@ void RecordAppLaunch(Profile* profile, GURL url) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); folderImage_.reset( [rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER) retain]); - defaultImage_.reset([gfx::GetCachedImageWithName(@"nav.pdf") retain]); + defaultImage_.reset([rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) retain]); // Register for theme changes, bookmark button pulsing, ... NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter]; diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm index a02c89b..054dfcc 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell_unittest.mm @@ -1,10 +1,12 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/memory/scoped_nsobject.h" #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h" #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" +#include "grit/ui_resources_standard.h" +#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/mac/nsimage_cache.h" namespace { @@ -31,8 +33,9 @@ TEST_F(BookmarkBarFolderButtonCellTest, FaviconPositioning) { ASSERT_TRUE(view.get()); ASSERT_TRUE(folder_view.get()); + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); scoped_nsobject<NSImage> image( - [gfx::GetCachedImageWithName(@"nav.pdf") retain]); + [rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) retain]); ASSERT_TRUE(image.get()); scoped_nsobject<BookmarkButtonCell> cell( diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm index 9f877c1..3678c4d 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,8 +9,10 @@ #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu.h" #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" +#include "grit/ui_resources_standard.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" +#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" #include "ui/gfx/mac/nsimage_cache.h" @@ -63,8 +65,9 @@ TEST_F(BookmarkButtonCellTest, IconOnlySqueeze) { [view setCell:cell.get()]; [[test_window() contentView] addSubview:view]; + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); scoped_nsobject<NSImage> image( - [gfx::GetCachedImageWithName(@"nav.pdf") retain]); + [rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) retain]); EXPECT_TRUE(image.get()); NSRect r = NSMakeRect(0, 0, 100, 100); diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm index 51f50c5..b3269c6 100644 --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm @@ -15,6 +15,7 @@ #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h" #include "grit/generated_resources.h" #include "grit/theme_resources_standard.h" +#include "grit/ui_resources_standard.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" @@ -309,8 +310,10 @@ void BookmarkMenuBridge::ConfigureMenuItem(const BookmarkNode* node, favicon = image.ToNSImage(); } // If we do not have a loaded favicon, use the default site image instead. - if (!favicon) - favicon = gfx::GetCachedImageWithName(@"nav.pdf"); + if (!favicon) { + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + favicon = rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON); + } [item setImage:favicon]; } diff --git a/chrome/browser/ui/cocoa/history_menu_bridge.mm b/chrome/browser/ui/cocoa/history_menu_bridge.mm index d48e2c0..590c15b 100644 --- a/chrome/browser/ui/cocoa/history_menu_bridge.mm +++ b/chrome/browser/ui/cocoa/history_menu_bridge.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -24,7 +24,7 @@ #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "skia/ext/skia_utils_mac.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" @@ -96,7 +96,7 @@ HistoryMenuBridge::HistoryMenuBridge(Profile* profile) } ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - default_favicon_.reset([gfx::GetCachedImageWithName(@"nav.pdf") retain]); + default_favicon_.reset([rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) retain]); // Set the static icons in the menu. NSMenuItem* item = [HistoryMenu() itemWithTag:IDC_SHOW_HISTORY]; diff --git a/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm b/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm index 02915f1..7af4523 100644 --- a/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm +++ b/chrome/browser/ui/cocoa/tab_contents/favicon_util.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,16 +9,15 @@ #include "base/mac/mac_util.h" #include "chrome/browser/favicon/favicon_tab_helper.h" #include "chrome/browser/ui/tab_contents/tab_contents.h" +#include "grit/ui_resources_standard.h" #include "skia/ext/skia_utils_mac.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/mac/nsimage_cache.h" namespace mac { NSImage* FaviconForTabContents(TabContents* contents) { - // FaviconTabHelper returns IDR_DEFAULT_FAVICON, which is a rasterized version - // of the Mac PDF. Use the PDF so the icon in the Omnibox matches the default - // favicon. if (contents && contents->favicon_tab_helper()->FaviconIsValid()) { CGColorSpaceRef color_space = base::mac::GetSystemColorSpace(); NSImage* image = gfx::SkBitmapToNSImageWithColorSpace( @@ -30,7 +29,8 @@ NSImage* FaviconForTabContents(TabContents* contents) { } } - return gfx::GetCachedImageWithName(@"nav.pdf"); + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + return rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON); } } // namespace mac diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm index 2cf2138..4551d10 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm @@ -368,8 +368,9 @@ private: // (see |-addSubviewToPermanentList:|) will be wiped out. permanentSubviews_.reset([[NSMutableArray alloc] init]); + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); defaultFavicon_.reset( - [gfx::GetCachedImageWithName(@"nav.pdf") retain]); + [rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) retain]); [self setLeftIndentForControls:[[self class] defaultLeftIndentForControls]]; [self setRightIndentForControls:0]; diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc index 2a3dc46..e13860c 100644 --- a/chrome/browser/ui/gtk/gtk_theme_service.cc +++ b/chrome/browser/ui/gtk/gtk_theme_service.cc @@ -33,6 +33,7 @@ #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" #include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColor.h" diff --git a/chrome/browser/ui/gtk/task_manager_gtk.cc b/chrome/browser/ui/gtk/task_manager_gtk.cc index 7a93341..3caeaf0 100644 --- a/chrome/browser/ui/gtk/task_manager_gtk.cc +++ b/chrome/browser/ui/gtk/task_manager_gtk.cc @@ -29,7 +29,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "grit/chromium_strings.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/gtk/gtk_hig_constants.h" #include "ui/base/gtk/menu_label_accelerator_util.h" diff --git a/chrome/browser/ui/intents/web_intent_picker_model.cc b/chrome/browser/ui/intents/web_intent_picker_model.cc index 298893c..4e9649c 100644 --- a/chrome/browser/ui/intents/web_intent_picker_model.cc +++ b/chrome/browser/ui/intents/web_intent_picker_model.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/stl_util.h" #include "chrome/browser/ui/intents/web_intent_picker_model_observer.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm index ac49678..6a349fc 100644 --- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm +++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm @@ -578,8 +578,9 @@ enum { image:iconImage]; } else { SkBitmap bitmap = windowShim_->panel()->GetCurrentPageIcon(); + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); NSImage* iconImage = bitmap.isNull() ? - gfx::GetCachedImageWithName(@"nav.pdf") : + rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) : gfx::SkBitmapToNSImageWithColorSpace(bitmap, base::mac::GetSystemColorSpace()); NSImageView* iconView = diff --git a/chrome/browser/ui/search_engines/template_url_table_model.cc b/chrome/browser/ui/search_engines/template_url_table_model.cc index 280f386..5d96293 100644 --- a/chrome/browser/ui/search_engines/template_url_table_model.cc +++ b/chrome/browser/ui/search_engines/template_url_table_model.cc @@ -14,7 +14,7 @@ #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_service.h" #include "grit/generated_resources.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/models/table_model_observer.h" diff --git a/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc b/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc index 7a3b328..2c02861 100644 --- a/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc +++ b/chrome/browser/ui/views/ash/launcher/browser_launcher_item_controller.cc @@ -19,7 +19,7 @@ #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h" #include "chrome/browser/web_applications/web_app.h" #include "content/public/browser/web_contents.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc index 3ad5139..88d6e30 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc @@ -50,7 +50,7 @@ #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "grit/theme_resources_standard.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/accessibility/accessible_view_state.h" #include "ui/base/animation/slide_animation.h" #include "ui/base/dragdrop/drag_utils.h" diff --git a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc index 4a2ec99..95edc9e 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc @@ -19,7 +19,7 @@ #include "content/public/browser/user_metrics.h" #include "grit/generated_resources.h" #include "grit/theme_resources_standard.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc index 6fa19b9..54d8290 100644 --- a/chrome/browser/ui/webui/favicon_source.cc +++ b/chrome/browser/ui/webui/favicon_source.cc @@ -11,6 +11,7 @@ #include "chrome/common/url_constants.h" #include "grit/locale_settings.h" #include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index fa922a1..e9310fb 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -288,7 +288,6 @@ 'app/theme/menu_hierarchy_arrow.pdf', 'app/theme/menu_overflow_down.pdf', 'app/theme/menu_overflow_up.pdf', - 'app/theme/nav.pdf', 'app/theme/omnibox_extension_app.pdf', 'app/theme/omnibox_http.pdf', 'app/theme/omnibox_https_invalid.pdf', diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 53030d5..51730d5 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc @@ -423,6 +423,10 @@ base::StringPiece ChromeContentClient::GetDataResource( resource_id, scale_factor); } +gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const { + return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); +} + #if defined(OS_WIN) bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, sandbox::TargetPolicy* policy) { diff --git a/chrome/common/chrome_content_client.h b/chrome/common/chrome_content_client.h index e6074d5..57f5ea2 100644 --- a/chrome/common/chrome_content_client.h +++ b/chrome/common/chrome_content_client.h @@ -36,6 +36,7 @@ class ChromeContentClient : public content::ContentClient { virtual base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const OVERRIDE; + virtual gfx::Image& GetNativeImageNamed(int resource_id) const OVERRIDE; #if defined(OS_WIN) virtual bool SandboxPlugin(CommandLine* command_line, diff --git a/content/DEPS b/content/DEPS index adba74a..f664729 100644 --- a/content/DEPS +++ b/content/DEPS @@ -17,6 +17,7 @@ include_rules = [ "+content/test", "+grit/content_resources.h", + "+grit/ui_resources_standard.h", "+grit/webkit_chromium_resources.h", "+grit/webkit_resources.h", "+grit/webkit_strings.h", diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm index f9e57a4..e194406 100644 --- a/content/browser/web_contents/web_drag_source_mac.mm +++ b/content/browser/web_contents/web_drag_source_mac.mm @@ -22,11 +22,13 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_client.h" #include "content/public/common/url_constants.h" +#include "grit/ui_resources_standard.h" #include "net/base/escape.h" #include "net/base/file_stream.h" #include "net/base/net_util.h" #include "ui/base/clipboard/custom_data_helper.h" #include "ui/base/dragdrop/cocoa_dnd_util.h" +#include "ui/gfx/image/image.h" #include "ui/gfx/mac/nsimage_cache.h" #include "webkit/glue/webdropdata.h" @@ -455,7 +457,7 @@ void PromiseWriterHelper(const WebDropData& drop_data, return dragImage_; // Default to returning a generic image. - return gfx::GetCachedImageWithName(@"nav.pdf"); + return content::GetContentClient()->GetNativeImageNamed(IDR_DEFAULT_FAVICON); } @end // @implementation WebDragSource (Private) diff --git a/content/content_browser.gypi b/content/content_browser.gypi index d80203f..7d585ac 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -17,6 +17,7 @@ '../ui/surface/surface.gyp:surface', '../ui/ui.gyp:ui', '../ui/ui.gyp:ui_resources', + '../ui/ui.gyp:ui_resources_standard', '../webkit/support/webkit_support.gyp:dom_storage', '../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_strings', diff --git a/content/public/common/content_client.cc b/content/public/common/content_client.cc index 8c40196..2b43403 100644 --- a/content/public/common/content_client.cc +++ b/content/public/common/content_client.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "base/string_piece.h" +#include "ui/gfx/image/image.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/ppapi/host_globals.h" @@ -66,6 +67,11 @@ base::StringPiece ContentClient::GetDataResource( return base::StringPiece(); } +gfx::Image& ContentClient::GetNativeImageNamed(int resource_id) const { + CR_DEFINE_STATIC_LOCAL(gfx::Image, kEmptyImage, ()); + return kEmptyImage; +} + #if defined(OS_WIN) bool ContentClient::SandboxPlugin(CommandLine* command_line, sandbox::TargetPolicy* policy) { diff --git a/content/public/common/content_client.h b/content/public/common/content_client.h index 4573edf..b72f43b 100644 --- a/content/public/common/content_client.h +++ b/content/public/common/content_client.h @@ -23,6 +23,10 @@ namespace IPC { class Message; } +namespace gfx { +class Image; +} + namespace sandbox { class TargetPolicy; } @@ -116,6 +120,9 @@ class CONTENT_EXPORT ContentClient { int resource_id, ui::ScaleFactor scale_factor) const; + // Returns a native image given its id. + virtual gfx::Image& GetNativeImageNamed(int resource_id) const; + #if defined(OS_WIN) // Allows the embedder to sandbox a plugin, and apply a custom policy. virtual bool SandboxPlugin(CommandLine* command_line, diff --git a/ui/resources/default_200_percent/default_favicon.png b/ui/resources/default_200_percent/default_favicon.png Binary files differnew file mode 100644 index 0000000..da4ee65 --- /dev/null +++ b/ui/resources/default_200_percent/default_favicon.png diff --git a/ui/resources/ui_resources.grd b/ui/resources/ui_resources.grd index 6d3ccce..e9a2586 100644 --- a/ui/resources/ui_resources.grd +++ b/ui/resources/ui_resources.grd @@ -29,7 +29,6 @@ <include name="IDR_CONTENT_BOTTOM_RIGHT_CORNER" file="default_100_percent/content_bottom_right_corner.png" type="BINDATA" /> <include name="IDR_CONTENT_LEFT_SIDE" file="default_100_percent/content_left_side.png" type="BINDATA" /> <include name="IDR_CONTENT_RIGHT_SIDE" file="default_100_percent/content_right_side.png" type="BINDATA" /> - <include name="IDR_DEFAULT_FAVICON" file="default_100_percent/default_favicon.png" type="BINDATA" /> <include name="IDR_DEFAULT_LARGE_FAVICON" file="default_100_percent/default_large_favicon.png" type="BINDATA" /> <include name="IDR_FOLDER_CLOSED" file="default_100_percent/folder_closed.png" type="BINDATA" /> <include name="IDR_FOLDER_CLOSED_RTL" file="default_100_percent/folder_closed_rtl.png" type="BINDATA" /> diff --git a/ui/resources/ui_resources_standard.grd b/ui/resources/ui_resources_standard.grd index 633f98d..f643f4a 100644 --- a/ui/resources/ui_resources_standard.grd +++ b/ui/resources/ui_resources_standard.grd @@ -44,6 +44,7 @@ <structure type="chrome_scaled_image" name="IDR_CLOSE_BAR_H" file="close_bar_hover.png" /> <structure type="chrome_scaled_image" name="IDR_CLOSE_BAR_MASK" file="close_bar_mask.png" /> <structure type="chrome_scaled_image" name="IDR_CLOSE_BAR_P" file="close_bar_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_DEFAULT_FAVICON" file="default_favicon.png" /> <structure type="chrome_scaled_image" name="IDR_THROBBER" file="throbber.png" /> <!-- Remaining images only used by Aura. --> diff --git a/ui/views/button_drag_utils.cc b/ui/views/button_drag_utils.cc index 8bdfe94..bfc1d531 100644 --- a/ui/views/button_drag_utils.cc +++ b/ui/views/button_drag_utils.cc @@ -6,7 +6,7 @@ #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" -#include "grit/ui_resources.h" +#include "grit/ui_resources_standard.h" #include "ui/base/dragdrop/drag_utils.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/resource/resource_bundle.h" |