OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" | 9 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
10 #include "chrome/browser/ui/autofill/popup_constants.h" | 10 #include "chrome/browser/ui/autofill/popup_constants.h" |
11 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h" | 11 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h" |
12 #include "components/autofill/core/browser/popup_item_ids.h" | 12 #include "components/autofill/core/browser/popup_item_ids.h" |
13 #include "grit/ui_resources.h" | |
14 #include "ui/base/cocoa/window_size_constants.h" | 13 #include "ui/base/cocoa/window_size_constants.h" |
15 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/gfx/font_list.h" | 15 #include "ui/gfx/font_list.h" |
17 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
18 #include "ui/gfx/point.h" | 17 #include "ui/gfx/point.h" |
19 #include "ui/gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
20 | 19 |
21 using autofill::AutofillPopupView; | 20 using autofill::AutofillPopupView; |
22 | 21 |
23 @interface AutofillPopupViewCocoa () | 22 @interface AutofillPopupViewCocoa () |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 return nil; | 267 return nil; |
269 | 268 |
270 int iconId = controller_->GetIconResourceID(controller_->icons()[index]); | 269 int iconId = controller_->GetIconResourceID(controller_->icons()[index]); |
271 DCHECK_NE(-1, iconId); | 270 DCHECK_NE(-1, iconId); |
272 | 271 |
273 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 272 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
274 return rb.GetNativeImageNamed(iconId).ToNSImage(); | 273 return rb.GetNativeImageNamed(iconId).ToNSImage(); |
275 } | 274 } |
276 | 275 |
277 @end | 276 @end |
OLD | NEW |