| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_account_chooser.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_account_chooser.h" |
| 6 | 6 |
| 7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
| 8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" |
| 9 #include "chrome/browser/ui/chrome_style.h" | 9 #include "chrome/browser/ui/chrome_style.h" |
| 10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" | 10 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h" |
| 11 #import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h" | 11 #import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h" |
| 12 #import "chrome/browser/ui/cocoa/menu_button.h" | 12 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 13 #include "grit/ui_resources.h" | |
| 14 #include "skia/ext/skia_utils_mac.h" | 13 #include "skia/ext/skia_utils_mac.h" |
| 15 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" | 14 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
| 16 #include "ui/base/models/menu_model.h" | 15 #include "ui/base/models/menu_model.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/resources/grit/ui_resources.h" |
| 18 | 18 |
| 19 #pragma mark Helper functions | 19 #pragma mark Helper functions |
| 20 | 20 |
| 21 // Adds an item with the specified properties to |menu|. | 21 // Adds an item with the specified properties to |menu|. |
| 22 void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title, | 22 void AddMenuItem(NSMenu *menu, id target, SEL selector, NSString* title, |
| 23 int tag, bool enabled, bool checked) { | 23 int tag, bool enabled, bool checked) { |
| 24 if (tag == -1) { | 24 if (tag == -1) { |
| 25 [menu addItem:[NSMenuItem separatorItem]]; | 25 [menu addItem:[NSMenuItem separatorItem]]; |
| 26 return; | 26 return; |
| 27 } | 27 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); | 144 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); |
| 145 [activeControl setFrame:frame]; | 145 [activeControl setFrame:frame]; |
| 146 | 146 |
| 147 [icon_ setFrameSize:[[icon_ image] size]]; | 147 [icon_ setFrameSize:[[icon_ image] size]]; |
| 148 frame.origin.x -= NSWidth([icon_ frame]) + autofill::kAroundTextPadding; | 148 frame.origin.x -= NSWidth([icon_ frame]) + autofill::kAroundTextPadding; |
| 149 [icon_ setFrameOrigin:frame.origin]; | 149 [icon_ setFrameOrigin:frame.origin]; |
| 150 } | 150 } |
| 151 | 151 |
| 152 @end | 152 @end |
| 153 | 153 |
| OLD | NEW |