Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Issue 10535126: Eliminate the "clock" icon in the omnibox dropdown. The distinction between this and the globe was… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" 5 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
6 6
7 #include <Carbon/Carbon.h> // kVK_Return 7 #include <Carbon/Carbon.h> // kVK_Return
8 8
9 #include "base/property_bag.h" 9 #include "base/property_bag.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // From the autocomplete popup, or the star icon at the RHS of the 138 // From the autocomplete popup, or the star icon at the RHS of the
139 // text field. 139 // text field.
140 case IDR_STAR: image_name = @"star.pdf"; break; 140 case IDR_STAR: image_name = @"star.pdf"; break;
141 case IDR_STAR_LIT: image_name = @"star_lit.pdf"; break; 141 case IDR_STAR_LIT: image_name = @"star_lit.pdf"; break;
142 142
143 // Values from |AutocompleteMatch::TypeToIcon()|. 143 // Values from |AutocompleteMatch::TypeToIcon()|.
144 case IDR_OMNIBOX_SEARCH: 144 case IDR_OMNIBOX_SEARCH:
145 image_name = @"omnibox_search.pdf"; break; 145 image_name = @"omnibox_search.pdf"; break;
146 case IDR_OMNIBOX_HTTP: 146 case IDR_OMNIBOX_HTTP:
147 image_name = @"omnibox_http.pdf"; break; 147 image_name = @"omnibox_http.pdf"; break;
148 case IDR_OMNIBOX_HISTORY:
149 image_name = @"omnibox_history.pdf"; break;
150 case IDR_OMNIBOX_EXTENSION_APP: 148 case IDR_OMNIBOX_EXTENSION_APP:
151 image_name = @"omnibox_extension_app.pdf"; break; 149 image_name = @"omnibox_extension_app.pdf"; break;
152 150
153 // Values from |ToolbarModel::GetIcon()|. 151 // Values from |ToolbarModel::GetIcon()|.
154 case IDR_OMNIBOX_HTTPS_VALID: 152 case IDR_OMNIBOX_HTTPS_VALID:
155 image_name = @"omnibox_https_valid.pdf"; break; 153 image_name = @"omnibox_https_valid.pdf"; break;
156 case IDR_OMNIBOX_HTTPS_WARNING: 154 case IDR_OMNIBOX_HTTPS_WARNING:
157 image_name = @"omnibox_https_warning.pdf"; break; 155 image_name = @"omnibox_https_warning.pdf"; break;
158 case IDR_OMNIBOX_HTTPS_INVALID: 156 case IDR_OMNIBOX_HTTPS_INVALID:
159 image_name = @"omnibox_https_invalid.pdf"; break; 157 image_name = @"omnibox_https_invalid.pdf"; break;
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 1121
1124 void OmniboxViewMac::PlaceCaretAt(NSUInteger pos) { 1122 void OmniboxViewMac::PlaceCaretAt(NSUInteger pos) {
1125 DCHECK(pos <= GetTextLength()); 1123 DCHECK(pos <= GetTextLength());
1126 SetSelectedRange(NSMakeRange(pos, pos)); 1124 SetSelectedRange(NSMakeRange(pos, pos));
1127 } 1125 }
1128 1126
1129 bool OmniboxViewMac::IsCaretAtEnd() const { 1127 bool OmniboxViewMac::IsCaretAtEnd() const {
1130 const NSRange selection = GetSelectedRange(); 1128 const NSRange selection = GetSelectedRange();
1131 return selection.length == 0 && selection.location == GetTextLength(); 1129 return selection.length == 0 && selection.location == GetTextLength();
1132 } 1130 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_match.cc ('k') | chrome/browser/ui/gtk/gtk_theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698