| 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_controller.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_controller.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/hyperlink_button_cell.h" | |
| 13 #import "chrome/browser/ui/cocoa/menu_button.h" | 12 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 14 #include "grit/ui_resources.h" | 13 #include "grit/ui_resources.h" |
| 15 #include "skia/ext/skia_utils_mac.h" | 14 #include "skia/ext/skia_utils_mac.h" |
| 15 #import "ui/base/cocoa/controls/hyperlink_button_cell.h" |
| 16 #include "ui/base/models/menu_model.h" | 16 #include "ui/base/models/menu_model.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.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]]; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); | 142 frame.origin.x = NSMaxX(bounds) - NSWidth(frame); |
| 143 [activeControl setFrame:frame]; | 143 [activeControl setFrame:frame]; |
| 144 | 144 |
| 145 [icon_ setFrameSize:[[icon_ image] size]]; | 145 [icon_ setFrameSize:[[icon_ image] size]]; |
| 146 frame.origin.x -= NSWidth([icon_ frame]) + kAroundTextPadding; | 146 frame.origin.x -= NSWidth([icon_ frame]) + kAroundTextPadding; |
| 147 [icon_ setFrameOrigin:frame.origin]; | 147 [icon_ setFrameOrigin:frame.origin]; |
| 148 } | 148 } |
| 149 | 149 |
| 150 @end | 150 @end |
| 151 | 151 |
| OLD | NEW |