Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: chrome/browser/ui/cocoa/toolbar_controller.mm

Issue 5961007: Move nsimage_cache from base to app/mac. Use the app::mac namespace. Update c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/tab_view.mm ('k') | chrome/browser/ui/cocoa/web_contents_drag_source.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/toolbar_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/toolbar_controller.mm (revision 69953)
+++ chrome/browser/ui/cocoa/toolbar_controller.mm (working copy)
@@ -8,11 +8,11 @@
#include "app/l10n_util.h"
#include "app/l10n_util_mac.h"
+#include "app/mac/nsimage_cache.h"
#include "app/menus/accelerator_cocoa.h"
#include "app/menus/menu_model.h"
#include "app/resource_bundle.h"
#include "base/mac_util.h"
-#include "base/nsimage_cache_mac.h"
#include "base/singleton.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -223,12 +223,15 @@
// images loaded directly from nibs in a framework to not get their "template"
// flags set properly. Thus, despite the images being set on the buttons in
// the xib, we must set them in code.
- [backButton_ setImage:nsimage_cache::ImageNamed(kBackButtonImageName)];
- [forwardButton_ setImage:nsimage_cache::ImageNamed(kForwardButtonImageName)];
- [reloadButton_
- setImage:nsimage_cache::ImageNamed(kReloadButtonReloadImageName)];
- [homeButton_ setImage:nsimage_cache::ImageNamed(kHomeButtonImageName)];
- [wrenchButton_ setImage:nsimage_cache::ImageNamed(kWrenchButtonImageName)];
+ [backButton_ setImage:app::mac::GetCachedImageWithName(kBackButtonImageName)];
+ [forwardButton_ setImage:
+ app::mac::GetCachedImageWithName(kForwardButtonImageName)];
+ [reloadButton_ setImage:
+ app::mac::GetCachedImageWithName(kReloadButtonReloadImageName)];
+ [homeButton_ setImage:
+ app::mac::GetCachedImageWithName(kHomeButtonImageName)];
+ [wrenchButton_ setImage:
+ app::mac::GetCachedImageWithName(kWrenchButtonImageName)];
if (UpgradeDetector::GetInstance()->notify_upgrade())
[self badgeWrenchMenu];
@@ -529,7 +532,8 @@
- (void)badgeWrenchMenu {
NSImage* badge = ResourceBundle::GetSharedInstance().GetNativeImageNamed(
IDR_UPDATE_BADGE);
- NSImage* wrenchImage = nsimage_cache::ImageNamed(kWrenchButtonImageName);
+ NSImage* wrenchImage =
+ app::mac::GetCachedImageWithName(kWrenchButtonImageName);
NSSize wrenchImageSize = [wrenchImage size];
scoped_nsobject<NSImage> overlayImage(
« no previous file with comments | « chrome/browser/ui/cocoa/tab_view.mm ('k') | chrome/browser/ui/cocoa/web_contents_drag_source.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698