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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 10553029: Handle interface to prerenders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remediated, and cleaned up in prep for uploading for review Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 14 matching lines...) Expand all
25 class OmniboxEditController; 25 class OmniboxEditController;
26 class OmniboxPopupModel; 26 class OmniboxPopupModel;
27 class OmniboxView; 27 class OmniboxView;
28 class Profile; 28 class Profile;
29 class SkBitmap; 29 class SkBitmap;
30 30
31 namespace gfx { 31 namespace gfx {
32 class Rect; 32 class Rect;
33 } 33 }
34 34
35 namespace predictors {
36 class AutocompleteActionPredictor;
37 }
38
35 class OmniboxEditModel : public AutocompleteControllerDelegate { 39 class OmniboxEditModel : public AutocompleteControllerDelegate {
36 public: 40 public:
37 struct State { 41 struct State {
38 State(bool user_input_in_progress, 42 State(bool user_input_in_progress,
39 const string16& user_text, 43 const string16& user_text,
40 const string16& keyword, 44 const string16& keyword,
41 bool is_keyword_hint); 45 bool is_keyword_hint);
42 ~State(); 46 ~State();
43 47
44 bool user_input_in_progress; 48 bool user_input_in_progress;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 size_t caret_position) const; 381 size_t caret_position) const;
378 382
379 // Notifies the SearchTabHelper that autocomplete state has changed. 383 // Notifies the SearchTabHelper that autocomplete state has changed.
380 void NotifySearchTabHelper(); 384 void NotifySearchTabHelper();
381 385
382 // Tries to start an instant preview for |match|. Returns true if instant 386 // Tries to start an instant preview for |match|. Returns true if instant
383 // processed the match. 387 // processed the match.
384 bool DoInstant(const AutocompleteMatch& match, string16* suggested_text); 388 bool DoInstant(const AutocompleteMatch& match, string16* suggested_text);
385 389
386 // Starts a prerender for the given |match|. 390 // Starts a prerender for the given |match|.
387 void DoPrerender(const AutocompleteMatch& match); 391 void DoPrerender(predictors::AutocompleteActionPredictor* action_predictor,
dominich 2012/06/28 00:34:32 this should be unnecessary - the predictor is prof
392 const AutocompleteMatch& match);
388 393
389 // Starts a DNS prefetch for the given |match|. 394 // Starts a DNS prefetch for the given |match|.
390 void DoPreconnect(const AutocompleteMatch& match); 395 void DoPreconnect(const AutocompleteMatch& match);
391 396
392 // Checks if a given character is a valid space character for accepting 397 // Checks if a given character is a valid space character for accepting
393 // keyword. 398 // keyword.
394 static bool IsSpaceCharForAcceptingKeyword(wchar_t c); 399 static bool IsSpaceCharForAcceptingKeyword(wchar_t c);
395 400
396 // Classify the current page being viewed as, for example, the new tab 401 // Classify the current page being viewed as, for example, the new tab
397 // page or a normal web page. Used for logging omnibox events for 402 // page or a normal web page. Used for logging omnibox events for
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // This has no effect if we're already in keyword mode. 517 // This has no effect if we're already in keyword mode.
513 bool allow_exact_keyword_match_; 518 bool allow_exact_keyword_match_;
514 519
515 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|. 520 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|.
516 InstantCompleteBehavior instant_complete_behavior_; 521 InstantCompleteBehavior instant_complete_behavior_;
517 522
518 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel); 523 DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
519 }; 524 };
520 525
521 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_ 526 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698