| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/ui/cocoa/encoding_menu_controller_delegate_mac.h" | 5 #include "chrome/browser/ui/cocoa/encoding_menu_controller_delegate_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" | 13 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 void AddSeparatorToMenu(NSMenu *parent_menu) { | 17 void AddSeparatorToMenu(NSMenu *parent_menu) { |
| 18 NSMenuItem* separator = [NSMenuItem separatorItem]; | 18 NSMenuItem* separator = [NSMenuItem separatorItem]; |
| 19 [parent_menu addItem:separator]; | 19 [parent_menu addItem:separator]; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 50 if (item_id == 0) { | 50 if (item_id == 0) { |
| 51 AddSeparatorToMenu(encoding_menu); | 51 AddSeparatorToMenu(encoding_menu); |
| 52 } else { | 52 } else { |
| 53 NSString *localized_title = | 53 NSString *localized_title = |
| 54 base::SysUTF16ToNSString(localized_title_string16); | 54 base::SysUTF16ToNSString(localized_title_string16); |
| 55 AppendMenuItem(encoding_menu, item_id, localized_title); | 55 AppendMenuItem(encoding_menu, item_id, localized_title); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 } | 59 } |
| OLD | NEW |