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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm

Issue 2510373003: Cleanup: Remove "gray text" logic from Omnibox (Closed)
Patch Set: review2 Created 4 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/location_bar/autocomplete_text_field_editor.h" 5 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
6 6
7 #include "base/mac/sdk_forward_declarations.h" 7 #include "base/mac/sdk_forward_declarations.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" // IDC_* 10 #include "chrome/app/chrome_command_ids.h" // IDC_*
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 return; 586 return;
587 587
588 [[FindPasteboard sharedInstance] setFindText:[selection string]]; 588 [[FindPasteboard sharedInstance] setFindText:[selection string]];
589 } 589 }
590 590
591 - (void)drawRect:(NSRect)rect { 591 - (void)drawRect:(NSRect)rect {
592 AutocompleteTextFieldObserver* observer = [self observer]; 592 AutocompleteTextFieldObserver* observer = [self observer];
593 if (observer) 593 if (observer)
594 observer->OnBeforeDrawRect(); 594 observer->OnBeforeDrawRect();
595 [super drawRect:rect]; 595 [super drawRect:rect];
596 autocomplete_text_field::DrawGrayTextAutocompletion(
597 [self textStorage],
598 [[self delegate] suggestText],
599 [[self delegate] suggestColor],
600 self,
601 [self bounds]);
602 if (observer) 596 if (observer)
603 observer->OnDidDrawRect(); 597 observer->OnDidDrawRect();
604 } 598 }
605 599
606 // ThemedWindowDrawing implementation. 600 // ThemedWindowDrawing implementation.
607 601
608 - (void)windowDidChangeTheme { 602 - (void)windowDidChangeTheme {
609 [self updateColorsToMatchTheme]; 603 [self updateColorsToMatchTheme];
610 } 604 }
611 605
612 - (void)windowDidChangeActive { 606 - (void)windowDidChangeActive {
613 } 607 }
614 608
615 @end 609 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698