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 "components/autofill/core/browser/suggestion.h" | 13 #include "components/autofill/core/browser/suggestion.h" |
14 #include "ui/base/cocoa/window_size_constants.h" | 14 #include "ui/base/cocoa/window_size_constants.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/gfx/font_list.h" | 16 #include "ui/gfx/font_list.h" |
| 17 #include "ui/gfx/geometry/point.h" |
17 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
18 #include "ui/gfx/point.h" | |
19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
20 | 20 |
21 using autofill::AutofillPopupView; | 21 using autofill::AutofillPopupView; |
22 | 22 |
23 @interface AutofillPopupViewCocoa () | 23 @interface AutofillPopupViewCocoa () |
24 | 24 |
25 #pragma mark - | 25 #pragma mark - |
26 #pragma mark Private methods | 26 #pragma mark Private methods |
27 | 27 |
28 // Draws an Autofill suggestion in the given |bounds|, labeled with the given | 28 // Draws an Autofill suggestion in the given |bounds|, labeled with the given |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 return nil; | 269 return nil; |
270 | 270 |
271 int iconId = controller_->GetIconResourceID(icon); | 271 int iconId = controller_->GetIconResourceID(icon); |
272 DCHECK_NE(-1, iconId); | 272 DCHECK_NE(-1, iconId); |
273 | 273 |
274 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 274 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
275 return rb.GetNativeImageNamed(iconId).ToNSImage(); | 275 return rb.GetNativeImageNamed(iconId).ToNSImage(); |
276 } | 276 } |
277 | 277 |
278 @end | 278 @end |
OLD | NEW |