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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" 9 #include "chrome/browser/ui/autofill/autofill_popup_controller.h"
10 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h" 10 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 [path stroke]; 127 [path stroke];
128 128
129 for (size_t i = 0; i < controller_->names().size(); ++i) { 129 for (size_t i = 0; i < controller_->names().size(); ++i) {
130 // Skip rows outside of the dirty rect. 130 // Skip rows outside of the dirty rect.
131 NSRect rowBounds = 131 NSRect rowBounds =
132 NSRectFromCGRect(controller_->GetRowBounds(i).ToCGRect()); 132 NSRectFromCGRect(controller_->GetRowBounds(i).ToCGRect());
133 if (!NSIntersectsRect(rowBounds, dirtyRect)) 133 if (!NSIntersectsRect(rowBounds, dirtyRect))
134 continue; 134 continue;
135 135
136 if (controller_->identifiers()[i] == 136 if (controller_->identifiers()[i] ==
137 WebKit::WebAutofillClient::MenuItemIDSeparator) { 137 blink::WebAutofillClient::MenuItemIDSeparator) {
138 [self drawSeparatorWithBounds:rowBounds]; 138 [self drawSeparatorWithBounds:rowBounds];
139 } else { 139 } else {
140 NSString* name = SysUTF16ToNSString(controller_->names()[i]); 140 NSString* name = SysUTF16ToNSString(controller_->names()[i]);
141 NSString* subtext = SysUTF16ToNSString(controller_->subtexts()[i]); 141 NSString* subtext = SysUTF16ToNSString(controller_->subtexts()[i]);
142 BOOL isSelected = static_cast<int>(i) == controller_->selected_line(); 142 BOOL isSelected = static_cast<int>(i) == controller_->selected_line();
143 [self drawSuggestionWithName:name 143 [self drawSuggestionWithName:name
144 subtext:subtext 144 subtext:subtext
145 index:i 145 index:i
146 bounds:rowBounds 146 bounds:rowBounds
147 selected:isSelected]; 147 selected:isSelected];
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return nil; 275 return nil;
276 276
277 int iconId = controller_->GetIconResourceID(controller_->icons()[index]); 277 int iconId = controller_->GetIconResourceID(controller_->icons()[index]);
278 DCHECK_NE(-1, iconId); 278 DCHECK_NE(-1, iconId);
279 279
280 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 280 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
281 return rb.GetNativeImageNamed(iconId).ToNSImage(); 281 return rb.GetNativeImageNamed(iconId).ToNSImage();
282 } 282 }
283 283
284 @end 284 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/applescript/tab_applescript.mm ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698