| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class OmniboxController : public AutocompleteControllerDelegate { | 36 class OmniboxController : public AutocompleteControllerDelegate { |
| 37 public: | 37 public: |
| 38 OmniboxController(OmniboxEditModel* omnibox_edit_model, | 38 OmniboxController(OmniboxEditModel* omnibox_edit_model, |
| 39 Profile* profile); | 39 Profile* profile); |
| 40 virtual ~OmniboxController(); | 40 virtual ~OmniboxController(); |
| 41 | 41 |
| 42 // The |current_url| field of input is only set for mobile ports. | 42 // The |current_url| field of input is only set for mobile ports. |
| 43 void StartAutocomplete(const AutocompleteInput& input) const; | 43 void StartAutocomplete(const AutocompleteInput& input) const; |
| 44 | 44 |
| 45 // AutocompleteControllerDelegate: | 45 // AutocompleteControllerDelegate: |
| 46 virtual void OnResultChanged(bool default_match_changed) OVERRIDE; | 46 virtual void OnResultChanged(bool default_match_changed) override; |
| 47 | 47 |
| 48 AutocompleteController* autocomplete_controller() { | 48 AutocompleteController* autocomplete_controller() { |
| 49 return autocomplete_controller_.get(); | 49 return autocomplete_controller_.get(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 // Set |current_match_| to an invalid value, indicating that we do not yet | 52 // Set |current_match_| to an invalid value, indicating that we do not yet |
| 53 // have a valid match for the current text in the omnibox. | 53 // have a valid match for the current text in the omnibox. |
| 54 void InvalidateCurrentMatch(); | 54 void InvalidateCurrentMatch(); |
| 55 | 55 |
| 56 void set_popup_model(OmniboxPopupModel* popup_model) { | 56 void set_popup_model(OmniboxPopupModel* popup_model) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 87 // TODO(beaudoin): This AutocompleteMatch is used to let the OmniboxEditModel | 87 // TODO(beaudoin): This AutocompleteMatch is used to let the OmniboxEditModel |
| 88 // know what it should display. Not every field is required for that purpose, | 88 // know what it should display. Not every field is required for that purpose, |
| 89 // but the ones specifically needed are unclear. We should therefore spend | 89 // but the ones specifically needed are unclear. We should therefore spend |
| 90 // some time to extract these fields and use a tighter structure here. | 90 // some time to extract these fields and use a tighter structure here. |
| 91 AutocompleteMatch current_match_; | 91 AutocompleteMatch current_match_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(OmniboxController); | 93 DISALLOW_COPY_AND_ASSIGN(OmniboxController); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ | 96 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ |
| OLD | NEW |