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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_header_view.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/new_tab_page_header_view.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
index de0865577637fa39d417c1185b17a1d2489b87a7..5364fe22a5d65f874d5b94641f8b871274af944c 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.mm
@@ -11,9 +11,9 @@
#import "ios/chrome/browser/ui/image_util.h"
#import "ios/chrome/browser/ui/ntp/new_tab_page_header_constants.h"
#import "ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.h"
+#import "ios/chrome/browser/ui/uikit_ui_util.h"
#import "ios/chrome/common/material_timing.h"
#include "ios/chrome/grit/ios_theme_resources.h"
-#include "ui/base/resource/resource_bundle.h"
#import "ui/gfx/ios/uikit_util.h"
namespace {
@@ -110,9 +110,7 @@ const CGFloat kMaxConstraintConstantDiff = 5;
UIViewAutoresizingFlexibleHeight];
[searchField insertSubview:_searchBoxBorder atIndex:0];
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- UIImage* fullBleedShadow =
- rb.GetNativeImageNamed(IDR_IOS_TOOLBAR_SHADOW_FULL_BLEED).ToUIImage();
+ UIImage* fullBleedShadow = NativeImage(IDR_IOS_TOOLBAR_SHADOW_FULL_BLEED);
_shadow.reset([[UIImageView alloc] initWithImage:fullBleedShadow]);
CGRect shadowFrame = [searchField bounds];
shadowFrame.origin.y =

Powered by Google App Engine
This is Rietveld 408576698