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

Unified Diff: ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.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/omnibox/omnibox_popup_view_ios.mm
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm
index 12d521ed35f6d59688e3661c1268e02c392ca3e5..a27ab4490edc5b1b5700df650685f71872d00a8d 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_popup_view_ios.mm
@@ -22,13 +22,12 @@
#include "ios/chrome/browser/ui/omnibox/omnibox_util.h"
#include "ios/chrome/browser/ui/omnibox/omnibox_view_ios.h"
#include "ios/chrome/browser/ui/ui_util.h"
+#import "ios/chrome/browser/ui/uikit_ui_util.h"
#include "ios/chrome/grit/ios_theme_resources.h"
#include "ios/web/public/image_fetcher/image_data_fetcher.h"
#include "ios/web/public/web_thread.h"
#include "net/url_request/url_request_context_getter.h"
-#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/image/image.h"
namespace {
const CGFloat kExpandAnimationDuration = 0.1;
@@ -74,11 +73,8 @@ OmniboxPopupViewIOS::OmniboxPopupViewIOS(OmniboxViewIOS* edit_view,
[popupView_ addSubview:popupControllerView];
if (IsIPadIdiom()) {
[popupView_ setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- gfx::Image shadowImage =
- rb.GetNativeImageNamed(IDR_IOS_TOOLBAR_SHADOW_FULL_BLEED);
- base::scoped_nsobject<UIImageView> shadowView(
- [[UIImageView alloc] initWithImage:shadowImage.ToUIImage()]);
+ base::scoped_nsobject<UIImageView> shadowView([[UIImageView alloc]
+ initWithImage:NativeImage(IDR_IOS_TOOLBAR_SHADOW_FULL_BLEED)]);
[shadowView setUserInteractionEnabled:NO];
[shadowView setTranslatesAutoresizingMaskIntoConstraints:NO];
[popupView_ addSubview:shadowView];

Powered by Google App Engine
This is Rietveld 408576698