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

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

Issue 39206: NO CODE CHANGE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/autocomplete/autocomplete_edit.h" 8 #include "chrome/browser/autocomplete/autocomplete_edit.h"
9 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" 9 #include "chrome/browser/autocomplete/autocomplete_popup_view.h"
10 #include "chrome/browser/net/dns_global.h" 10 #include "chrome/browser/net/dns_global.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // If we're going to trim the window size to no longer include the hovered 306 // If we're going to trim the window size to no longer include the hovered
307 // line, turn hover off. Practically, this shouldn't happen, but it 307 // line, turn hover off. Practically, this shouldn't happen, but it
308 // doesn't hurt to be defensive. 308 // doesn't hurt to be defensive.
309 if ((hovered_line_ != kNoMatch) && (result.size() <= hovered_line_)) 309 if ((hovered_line_ != kNoMatch) && (result.size() <= hovered_line_))
310 SetHoveredLine(kNoMatch); 310 SetHoveredLine(kNoMatch);
311 311
312 view_->UpdatePopupAppearance(); 312 view_->UpdatePopupAppearance();
313 } 313 }
314 // FALL THROUGH 314 // FALL THROUGH
315 315
316 case NotificationType::AUTOCOMPLETE_CONTROLLER_SYNCHRONOUS_MATCHES_AVAILABLE : { 316 case NotificationType::
317 AUTOCOMPLETE_CONTROLLER_SYNCHRONOUS_MATCHES_AVAILABLE: {
317 // Update the edit with the possibly new data for this match. 318 // Update the edit with the possibly new data for this match.
318 // NOTE: This must be done after the code above, so that our internal 319 // NOTE: This must be done after the code above, so that our internal
319 // state will be consistent when the edit calls back to 320 // state will be consistent when the edit calls back to
320 // URLsForCurrentSelection(). 321 // URLsForCurrentSelection().
321 std::wstring inline_autocomplete_text; 322 std::wstring inline_autocomplete_text;
322 std::wstring keyword; 323 std::wstring keyword;
323 bool is_keyword_hint = false; 324 bool is_keyword_hint = false;
324 AutocompleteMatch::Type type = AutocompleteMatch::SEARCH_WHAT_YOU_TYPED; 325 AutocompleteMatch::Type type = AutocompleteMatch::SEARCH_WHAT_YOU_TYPED;
325 const AutocompleteResult::const_iterator match(result.default_match()); 326 const AutocompleteResult::const_iterator match(result.default_match());
326 if (match != result.end()) { 327 if (match != result.end()) {
(...skipping 14 matching lines...) Expand all
341 } 342 }
342 edit_model_->OnPopupDataChanged(inline_autocomplete_text, false, keyword, 343 edit_model_->OnPopupDataChanged(inline_autocomplete_text, false, keyword,
343 is_keyword_hint, type); 344 is_keyword_hint, type);
344 return; 345 return;
345 } 346 }
346 347
347 default: 348 default:
348 NOTREACHED(); 349 NOTREACHED();
349 } 350 }
350 } 351 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.cc ('k') | chrome/browser/autocomplete/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698