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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_popup_model.cc

Issue 6359002: Removes some code we no longer care about. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 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_popup_model.h" 5 #include "chrome/browser/autocomplete/autocomplete_popup_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "unicode/ubidi.h" 9 #include "unicode/ubidi.h"
10 10
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 kNoMatch : static_cast<size_t>(result->default_match() - result->begin()); 310 kNoMatch : static_cast<size_t>(result->default_match() - result->begin());
311 // There had better not be a nonempty result set with no default match. 311 // There had better not be a nonempty result set with no default match.
312 CHECK((selected_line_ != kNoMatch) || result->empty()); 312 CHECK((selected_line_ != kNoMatch) || result->empty());
313 // If we're going to trim the window size to no longer include the hovered 313 // If we're going to trim the window size to no longer include the hovered
314 // line, turn hover off. Practically, this shouldn't happen, but it 314 // line, turn hover off. Practically, this shouldn't happen, but it
315 // doesn't hurt to be defensive. 315 // doesn't hurt to be defensive.
316 if ((hovered_line_ != kNoMatch) && (result->size() <= hovered_line_)) 316 if ((hovered_line_ != kNoMatch) && (result->size() <= hovered_line_))
317 SetHoveredLine(kNoMatch); 317 SetHoveredLine(kNoMatch);
318 318
319 view_->UpdatePopupAppearance(); 319 view_->UpdatePopupAppearance();
320 edit_model_->ResultsUpdated();
321 edit_model_->PopupBoundsChangedTo(view_->GetTargetBounds()); 320 edit_model_->PopupBoundsChangedTo(view_->GetTargetBounds());
322 } 321 }
323 322
324 const SkBitmap* AutocompletePopupModel::GetSpecialIconForMatch( 323 const SkBitmap* AutocompletePopupModel::GetSpecialIconForMatch(
325 const AutocompleteMatch& match) const { 324 const AutocompleteMatch& match) const {
326 if (!match.template_url || !match.template_url->IsExtensionKeyword()) 325 if (!match.template_url || !match.template_url->IsExtensionKeyword())
327 return NULL; 326 return NULL;
328 327
329 return &profile_->GetExtensionService()->GetOmniboxPopupIcon( 328 return &profile_->GetExtensionService()->GetOmniboxPopupIcon(
330 match.template_url->GetExtensionId()); 329 match.template_url->GetExtensionId());
331 } 330 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698