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

Unified Diff: ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm

Issue 2602903002: Factor iOS native image loading into a utility function. (Closed)
Patch Set: Fixed BUILD files. Created 4 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
Index: ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm
diff --git a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm
index 6cda5ab2022f65e730730d84e086564876cf3c1a..36e86a0fa0fb1a31c8c5b1db5d84f1be973036da 100644
--- a/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm
+++ b/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_panel_view_controller.mm
@@ -11,7 +11,6 @@
#include "ios/chrome/grit/ios_theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
-#include "ui/base/resource/resource_bundle.h"
// A UIViewController that forces the status bar to be visible.
@interface RecentTabsWrapperViewController : UIViewController
@@ -43,10 +42,8 @@
PanelBarView* panelBarView = [[[PanelBarView alloc] init] autorelease];
rtpvc->_panelBarView.reset([panelBarView retain]);
[panelBarView setCloseTarget:rtpvc action:@selector(didFinish)];
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- gfx::Image shadowImage = rb.GetNativeImageNamed(IDR_IOS_TOOLBAR_SHADOW);
base::scoped_nsobject<UIImageView> shadow(
- [[UIImageView alloc] initWithImage:shadowImage.ToUIImage()]);
+ [[UIImageView alloc] initWithImage:NativeImage(IDR_IOS_TOOLBAR_SHADOW)]);
[panelBarView setTranslatesAutoresizingMaskIntoConstraints:NO];
[rtpvc.view setTranslatesAutoresizingMaskIntoConstraints:NO];

Powered by Google App Engine
This is Rietveld 408576698