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

Side by Side Diff: chrome/browser/cocoa/autocomplete_text_field.mm

Issue 337027: [Mac] Adjust Omnibox implementation to not break undo chain. (Closed)
Patch Set: Tweak a comment Created 11 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
OLDNEW
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/cocoa/autocomplete_text_field.h" 5 #include "chrome/browser/cocoa/autocomplete_text_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/cocoa/autocomplete_text_field_cell.h" 8 #include "chrome/browser/cocoa/autocomplete_text_field_cell.h"
9 9
10 @implementation AutocompleteTextField 10 @implementation AutocompleteTextField
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (observer_) { 186 if (observer_) {
187 observer_->OnFrameChanged(); 187 observer_->OnFrameChanged();
188 } 188 }
189 } 189 }
190 190
191 // Due to theming, parts of the field are transparent. 191 // Due to theming, parts of the field are transparent.
192 - (BOOL)isOpaque { 192 - (BOOL)isOpaque {
193 return NO; 193 return NO;
194 } 194 }
195 195
196 - (void)setAttributedStringValue:(NSAttributedString*)aString {
197 NSTextView* editor = static_cast<NSTextView*>([self currentEditor]);
198 if (!editor) {
199 [super setAttributedStringValue:aString];
200 } else {
201 // -currentEditor is defined to return NSText*, make sure our
202 // assumptions still hold, here.
203 DCHECK([editor isKindOfClass:[NSTextView class]]);
204
205 NSTextStorage* textStorage = [editor textStorage];
206 DCHECK(textStorage);
207 [textStorage setAttributedString:aString];
208 }
209 }
210
196 @end 211 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field.h ('k') | chrome/browser/cocoa/autocomplete_text_field_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698