| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/autocomplete/autocomplete_edit_view_mac.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
| 6 | 6 |
| 7 #include <Carbon/Carbon.h> // kVK_Return | 7 #include <Carbon/Carbon.h> // kVK_Return |
| 8 | 8 |
| 9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
| 10 #include "app/clipboard/scoped_clipboard_writer.h" | 10 #include "app/clipboard/scoped_clipboard_writer.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 } // namespace | 120 } // namespace |
| 121 | 121 |
| 122 // static | 122 // static |
| 123 NSImage* AutocompleteEditViewMac::ImageForResource(int resource_id) { | 123 NSImage* AutocompleteEditViewMac::ImageForResource(int resource_id) { |
| 124 NSString* image_name = nil; | 124 NSString* image_name = nil; |
| 125 | 125 |
| 126 switch(resource_id) { | 126 switch(resource_id) { |
| 127 // From the autocomplete popup, or the star icon at the RHS of the | 127 // From the autocomplete popup, or the star icon at the RHS of the |
| 128 // text field. | 128 // text field. |
| 129 case IDR_OMNIBOX_STAR: image_name = @"omnibox_star.pdf"; break; | 129 case IDR_STAR: image_name = @"star.pdf"; break; |
| 130 case IDR_OMNIBOX_STAR_LIT: image_name = @"omnibox_star_lit.pdf"; break; | 130 case IDR_STAR_LIT: image_name = @"star_lit.pdf"; break; |
| 131 | 131 |
| 132 // Values from |AutocompleteMatch::TypeToIcon()|. | 132 // Values from |AutocompleteMatch::TypeToIcon()|. |
| 133 case IDR_OMNIBOX_SEARCH: image_name = @"omnibox_search.pdf"; break; | 133 case IDR_OMNIBOX_SEARCH: image_name = @"omnibox_search.pdf"; break; |
| 134 case IDR_OMNIBOX_HTTP: image_name = @"omnibox_http.pdf"; break; | 134 case IDR_OMNIBOX_HTTP: image_name = @"omnibox_http.pdf"; break; |
| 135 case IDR_OMNIBOX_HISTORY: image_name = @"omnibox_history.pdf"; break; | 135 case IDR_OMNIBOX_HISTORY: image_name = @"omnibox_history.pdf"; break; |
| 136 case IDR_OMNIBOX_MORE: image_name = @"omnibox_more.pdf"; break; | 136 case IDR_OMNIBOX_MORE: image_name = @"omnibox_more.pdf"; break; |
| 137 | 137 |
| 138 // Values from |ToolbarModel::GetIcon()|. | 138 // Values from |ToolbarModel::GetIcon()|. |
| 139 case IDR_OMNIBOX_HTTPS_VALID: | 139 case IDR_OMNIBOX_HTTPS_VALID: |
| 140 image_name = @"omnibox_https_valid.pdf"; break; | 140 image_name = @"omnibox_https_valid.pdf"; break; |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 } | 915 } |
| 916 | 916 |
| 917 return std::wstring(); | 917 return std::wstring(); |
| 918 } | 918 } |
| 919 | 919 |
| 920 // static | 920 // static |
| 921 NSFont* AutocompleteEditViewMac::GetFieldFont() { | 921 NSFont* AutocompleteEditViewMac::GetFieldFont() { |
| 922 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 922 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 923 return rb.GetFont(ResourceBundle::BaseFont).nativeFont(); | 923 return rb.GetFont(ResourceBundle::BaseFont).nativeFont(); |
| 924 } | 924 } |
| OLD | NEW |