Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 virtual void OnAutocompleteLosingFocus( | 43 virtual void OnAutocompleteLosingFocus( |
| 44 gfx::NativeView view_gaining_focus) = 0; | 44 gfx::NativeView view_gaining_focus) = 0; |
| 45 | 45 |
| 46 // Sent prior to OnAutoCompleteAccept and before the model has been reverted. | 46 // Sent prior to OnAutoCompleteAccept and before the model has been reverted. |
| 47 virtual void OnAutocompleteWillAccept() = 0; | 47 virtual void OnAutocompleteWillAccept() = 0; |
| 48 | 48 |
| 49 // Commits the suggested text. |typed_text| is the current text showing in the | 49 // Commits the suggested text. |typed_text| is the current text showing in the |
| 50 // autocomplete. Returns true if the text was committed. | 50 // autocomplete. Returns true if the text was committed. |
| 51 virtual bool OnCommitSuggestedText(const std::wstring& typed_text) = 0; | 51 virtual bool OnCommitSuggestedText(const std::wstring& typed_text) = 0; |
| 52 | 52 |
| 53 // Accepts the currently showing instant preview, if any. | |
|
sky
2010/12/01 15:53:16
Document return value. In facvt, do you even need
Evan Stade
2010/12/01 18:37:25
will do. We do need it because we need to know if
| |
| 54 virtual bool AcceptCurrentInstantPreview() { return false; } | |
| 55 | |
| 53 // Sets the suggested search text to |suggested_text|. | 56 // Sets the suggested search text to |suggested_text|. |
| 54 virtual void OnSetSuggestedSearchText(const string16& suggested_text) = 0; | 57 virtual void OnSetSuggestedSearchText(const string16& suggested_text) = 0; |
| 55 | 58 |
| 56 // Invoked when the popup is going to change its bounds to |bounds|. | 59 // Invoked when the popup is going to change its bounds to |bounds|. |
| 57 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds) = 0; | 60 virtual void OnPopupBoundsChanged(const gfx::Rect& bounds) = 0; |
| 58 | 61 |
| 59 // When the user presses enter or selects a line with the mouse, this | 62 // When the user presses enter or selects a line with the mouse, this |
| 60 // function will get called synchronously with the url to open and | 63 // function will get called synchronously with the url to open and |
| 61 // disposition and transition to use when opening it. | 64 // disposition and transition to use when opening it. |
| 62 // | 65 // |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 489 mutable GURL paste_and_go_url_; | 492 mutable GURL paste_and_go_url_; |
| 490 mutable PageTransition::Type paste_and_go_transition_; | 493 mutable PageTransition::Type paste_and_go_transition_; |
| 491 mutable GURL paste_and_go_alternate_nav_url_; | 494 mutable GURL paste_and_go_alternate_nav_url_; |
| 492 | 495 |
| 493 Profile* profile_; | 496 Profile* profile_; |
| 494 | 497 |
| 495 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); | 498 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); |
| 496 }; | 499 }; |
| 497 | 500 |
| 498 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ | 501 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ |
| OLD | NEW |