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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Turns off keyword mode for the current match. | 89 // Turns off keyword mode for the current match. |
90 void ClearPopupKeywordMode() const; | 90 void ClearPopupKeywordMode() const; |
91 | 91 |
92 const AutocompleteResult& result() const { | 92 const AutocompleteResult& result() const { |
93 return autocomplete_controller_->result(); | 93 return autocomplete_controller_->result(); |
94 } | 94 } |
95 | 95 |
96 // TODO(beaudoin): Make private once OmniboxEditModel no longer refers to it. | 96 // TODO(beaudoin): Make private once OmniboxEditModel no longer refers to it. |
97 void DoPreconnect(const AutocompleteMatch& match); | 97 void DoPreconnect(const AutocompleteMatch& match); |
98 | 98 |
99 // TODO(beaudoin): Make private once OmniboxEditModel no longer refers to it. | |
100 // Invoked when the popup has changed its bounds to |bounds|. |bounds| here | |
101 // is in screen coordinates. | |
102 void OnPopupBoundsChanged(const gfx::Rect& bounds); | |
103 | |
104 private: | 99 private: |
105 | 100 |
106 // Returns true if a verbatim query should be used for Instant. A verbatim | 101 // Returns true if a verbatim query should be used for Instant. A verbatim |
107 // query is forced in certain situations, such as pressing delete at the end | 102 // query is forced in certain situations, such as pressing delete at the end |
108 // of the edit. | 103 // of the edit. |
109 bool UseVerbatimInstant(bool just_deleted_text) const; | 104 bool UseVerbatimInstant(bool just_deleted_text) const; |
110 | 105 |
111 // Access the instant controller from the OmniboxEditModel. We need to do this | 106 // Access the instant controller from the OmniboxEditModel. We need to do this |
112 // because the only valid pointer to InstantController is kept in Browser, | 107 // because the only valid pointer to InstantController is kept in Browser, |
113 // which OmniboxEditModel has some ways of reaching. | 108 // which OmniboxEditModel has some ways of reaching. |
(...skipping 23 matching lines...) Expand all Loading... |
137 AutocompleteMatch current_match_; | 132 AutocompleteMatch current_match_; |
138 | 133 |
139 // The completion suggested by instant, displayed in gray text besides | 134 // The completion suggested by instant, displayed in gray text besides |
140 // |fill_into_edit|. | 135 // |fill_into_edit|. |
141 string16 gray_suggestion_; | 136 string16 gray_suggestion_; |
142 | 137 |
143 DISALLOW_COPY_AND_ASSIGN(OmniboxController); | 138 DISALLOW_COPY_AND_ASSIGN(OmniboxController); |
144 }; | 139 }; |
145 | 140 |
146 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ | 141 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_CONTROLLER_H_ |
OLD | NEW |