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

Side by Side Diff: chrome/browser/ui/search/instant_controller.h

Issue 13813006: Instant: Don't allow the page to set suggestions inappropriately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // In non-extended mode, only |overlay_| is ever non-NULL. 391 // In non-extended mode, only |overlay_| is ever non-NULL.
392 scoped_ptr<InstantOverlay> overlay_; 392 scoped_ptr<InstantOverlay> overlay_;
393 scoped_ptr<InstantNTP> ntp_; 393 scoped_ptr<InstantNTP> ntp_;
394 scoped_ptr<InstantTab> instant_tab_; 394 scoped_ptr<InstantTab> instant_tab_;
395 395
396 // The most recent full_text passed to Update(). If empty, we'll not accept 396 // The most recent full_text passed to Update(). If empty, we'll not accept
397 // search suggestions from |overlay_| or |instant_tab_|. 397 // search suggestions from |overlay_| or |instant_tab_|.
398 string16 last_omnibox_text_; 398 string16 last_omnibox_text_;
399 399
400 // The most recent user_text passed to Update(). Used to filter out-of-date 400 // The most recent user_text passed to Update(). Used to filter out-of-date
401 // URL suggestions from the Instant page. 401 // URL suggestions from the Instant page. Set in Update() and cleared when
402 // the page sets temporary text (SetSuggestions() with REPLACE behavior).
402 string16 last_user_text_; 403 string16 last_user_text_;
403 404
404 // True if the last Update() had an inline autocompletion. Used only to make 405 // True if the last Update() had an inline autocompletion. Used only to make
405 // sure that we don't accidentally suggest gray text suggestion in that case. 406 // sure that we don't accidentally suggest gray text suggestion in that case.
406 bool last_omnibox_text_has_inline_autocompletion_; 407 bool last_omnibox_text_has_inline_autocompletion_;
407 408
408 // The most recent verbatim passed to Update(). Used only to ensure that we 409 // The most recent verbatim passed to Update(). Used only to ensure that we
409 // don't accidentally suggest an inline autocompletion. 410 // don't accidentally suggest an inline autocompletion.
410 bool last_verbatim_; 411 bool last_verbatim_;
411 412
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // Used for Top Sites async retrieval. 470 // Used for Top Sites async retrieval.
470 base::WeakPtrFactory<InstantController> weak_ptr_factory_; 471 base::WeakPtrFactory<InstantController> weak_ptr_factory_;
471 472
472 // Used to get notifications about Most Visted changes. 473 // Used to get notifications about Most Visted changes.
473 content::NotificationRegistrar registrar_; 474 content::NotificationRegistrar registrar_;
474 475
475 DISALLOW_COPY_AND_ASSIGN(InstantController); 476 DISALLOW_COPY_AND_ASSIGN(InstantController);
476 }; 477 };
477 478
478 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_ 479 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698